mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-27 11:53:23 +01:00
Show sender and device number in decryption error toast
This commit is contained in:
@@ -6,6 +6,8 @@ import type { LocalizerType } from '../types/Util';
|
||||
import { Toast } from './Toast';
|
||||
|
||||
export type ToastPropsType = {
|
||||
deviceId: number;
|
||||
name: string;
|
||||
onShowDebugLog: () => unknown;
|
||||
};
|
||||
|
||||
@@ -15,7 +17,9 @@ type PropsType = {
|
||||
} & ToastPropsType;
|
||||
|
||||
export const ToastDecryptionError = ({
|
||||
deviceId,
|
||||
i18n,
|
||||
name,
|
||||
onClose,
|
||||
onShowDebugLog,
|
||||
}: PropsType): JSX.Element => {
|
||||
@@ -24,12 +28,16 @@ export const ToastDecryptionError = ({
|
||||
autoDismissDisabled
|
||||
className="decryption-error"
|
||||
onClose={onClose}
|
||||
style={{ maxWidth: '500px' }}
|
||||
toastAction={{
|
||||
label: i18n('decryptionErrorToastAction'),
|
||||
onClick: onShowDebugLog,
|
||||
}}
|
||||
>
|
||||
{i18n('decryptionErrorToast')}
|
||||
{i18n('decryptionErrorToast', {
|
||||
name,
|
||||
deviceId,
|
||||
})}
|
||||
</Toast>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user