mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-09-20 00:35:17 +01:00
Co-authored-by: Jamie <113370520+jamiebuilds-signal@users.noreply.github.com>
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
// Copyright 2026 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import type { ReactNode } from 'react';
|
|
import type { LocalizerType } from '../../types/Util.std.ts';
|
|
import { AxoAlertDialog } from '../../axo/AxoAlertDialog.dom.tsx';
|
|
|
|
type OSAuthErrorDialogPropsType = Readonly<{
|
|
i18n: LocalizerType;
|
|
open: boolean;
|
|
onOpenChange: (newOpen: boolean) => void;
|
|
}>;
|
|
|
|
export function OSAuthErrorDialog({
|
|
i18n,
|
|
open,
|
|
onOpenChange,
|
|
}: OSAuthErrorDialogPropsType): ReactNode {
|
|
return (
|
|
<AxoAlertDialog.Root open={open} onOpenChange={onOpenChange}>
|
|
<AxoAlertDialog.Content escape="cancel-is-noop">
|
|
<AxoAlertDialog.Title screenReaderOnly>
|
|
{i18n('icu:Toast--error')}
|
|
</AxoAlertDialog.Title>
|
|
<AxoAlertDialog.Body>
|
|
<AxoAlertDialog.Description>
|
|
{i18n('icu:Preferences__local-backups-auth-error--unauthorized')}
|
|
</AxoAlertDialog.Description>
|
|
</AxoAlertDialog.Body>
|
|
<AxoAlertDialog.Footer>
|
|
<AxoAlertDialog.Cancel>{i18n('icu:ok')}</AxoAlertDialog.Cancel>
|
|
</AxoAlertDialog.Footer>
|
|
</AxoAlertDialog.Content>
|
|
</AxoAlertDialog.Root>
|
|
);
|
|
}
|