pull/1288/head
Audric Ackermann 5 years ago
parent abc9456d14
commit 761ebf4a7c
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -90,7 +90,14 @@
type: 'success', type: 'success',
}); });
}, },
showConfirmationDialog({ title, message, messageSub, onOk, onCancel, hideCancel }) { showConfirmationDialog({
title,
message,
messageSub,
onOk,
onCancel,
hideCancel,
}) {
window.confirmationDialog({ window.confirmationDialog({
title, title,
message, message,

@ -57,11 +57,15 @@ export class ActionsPanel extends React.Component<Props, State> {
}, },
'refreshAvatarCallback' 'refreshAvatarCallback'
); );
setTimeout( setTimeout(async () => {
async () => { const hasMultipleDevices =
const hasMultipleDevices = (await MultiDeviceProtocol.getOurDevices()).length > 1; (await MultiDeviceProtocol.getOurDevices()).length > 1;
const primaryWithSecondary = !window.textsecure.storage.get('isSecondaryDevice') && hasMultipleDevices; const primaryWithSecondary =
const isSecondary = !!window.textsecure.storage.get('isSecondaryDevice'); !window.textsecure.storage.get('isSecondaryDevice') &&
hasMultipleDevices;
const isSecondary = !!window.textsecure.storage.get(
'isSecondaryDevice'
);
if (!primaryWithSecondary && !isSecondary) { if (!primaryWithSecondary && !isSecondary) {
return; return;
@ -70,13 +74,12 @@ export class ActionsPanel extends React.Component<Props, State> {
const opts = { const opts = {
hideCancel: true, hideCancel: true,
title: window.i18n('multiDeviceDisabledTemporaryTitle'), title: window.i18n('multiDeviceDisabledTemporaryTitle'),
message: primaryWithSecondary ? window.i18n('multiDeviceDisabledTemporaryDescriptionPrimary') : window.i18n('multiDeviceDisabledTemporaryDescriptionSecondary') message: primaryWithSecondary
, ? window.i18n('multiDeviceDisabledTemporaryDescriptionPrimary')
: window.i18n('multiDeviceDisabledTemporaryDescriptionSecondary'),
}; };
window.Whisper.events.trigger('showConfirmationDialog', opts); window.Whisper.events.trigger('showConfirmationDialog', opts);
}, }, 1000);
1000
);
} }
); );
} }

@ -62,7 +62,11 @@ export class SessionConfirm extends React.Component<Props> {
{!showHeader && <div className="spacer-lg" />} {!showHeader && <div className="spacer-lg" />}
<div className="session-modal__centered"> <div className="session-modal__centered">
<SessionHtmlRenderer tag="span" className={messageSubText} html={message} /> <SessionHtmlRenderer
tag="span"
className={messageSubText}
html={message}
/>
{messageSub && ( {messageSub && (
<span className="session-confirm-sub-message subtle"> <span className="session-confirm-sub-message subtle">
{messageSub} {messageSub}

Loading…
Cancel
Save