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,26 +57,29 @@ 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;
if (!primaryWithSecondary && !isSecondary) { const isSecondary = !!window.textsecure.storage.get(
return; 'isSecondaryDevice'
} );
const opts = { if (!primaryWithSecondary && !isSecondary) {
hideCancel: true, return;
title: window.i18n('multiDeviceDisabledTemporaryTitle'), }
message: primaryWithSecondary ? window.i18n('multiDeviceDisabledTemporaryDescriptionPrimary') : window.i18n('multiDeviceDisabledTemporaryDescriptionSecondary')
, const opts = {
}; hideCancel: true,
window.Whisper.events.trigger('showConfirmationDialog', opts); title: window.i18n('multiDeviceDisabledTemporaryTitle'),
}, message: primaryWithSecondary
1000 ? window.i18n('multiDeviceDisabledTemporaryDescriptionPrimary')
); : window.i18n('multiDeviceDisabledTemporaryDescriptionSecondary'),
};
window.Whisper.events.trigger('showConfirmationDialog', opts);
}, 1000);
} }
); );
} }

@ -584,7 +584,7 @@ export class RegistrationTabs extends React.Component<{}, State> {
return ( return (
<div> <div>
{this.renderContinueYourSessionButton()} {this.renderContinueYourSessionButton()}
{/*<h4>{or}</h4>*/} {/*<h4>{or}</h4>*/}
{/* FIXME enable back to allow linking of device {/* FIXME enable back to allow linking of device
this.renderLinkDeviceToExistingAccountButton()*/} this.renderLinkDeviceToExistingAccountButton()*/}
</div> </div>

@ -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