lint
This commit is contained in:
parent
abc9456d14
commit
761ebf4a7c
|
@ -90,7 +90,14 @@
|
|||
type: 'success',
|
||||
});
|
||||
},
|
||||
showConfirmationDialog({ title, message, messageSub, onOk, onCancel, hideCancel }) {
|
||||
showConfirmationDialog({
|
||||
title,
|
||||
message,
|
||||
messageSub,
|
||||
onOk,
|
||||
onCancel,
|
||||
hideCancel,
|
||||
}) {
|
||||
window.confirmationDialog({
|
||||
title,
|
||||
message,
|
||||
|
|
|
@ -57,26 +57,29 @@ export class ActionsPanel extends React.Component<Props, State> {
|
|||
},
|
||||
'refreshAvatarCallback'
|
||||
);
|
||||
setTimeout(
|
||||
async () => {
|
||||
const hasMultipleDevices = (await MultiDeviceProtocol.getOurDevices()).length > 1;
|
||||
const primaryWithSecondary = !window.textsecure.storage.get('isSecondaryDevice') && hasMultipleDevices;
|
||||
const isSecondary = !!window.textsecure.storage.get('isSecondaryDevice');
|
||||
setTimeout(async () => {
|
||||
const hasMultipleDevices =
|
||||
(await MultiDeviceProtocol.getOurDevices()).length > 1;
|
||||
const primaryWithSecondary =
|
||||
!window.textsecure.storage.get('isSecondaryDevice') &&
|
||||
hasMultipleDevices;
|
||||
const isSecondary = !!window.textsecure.storage.get(
|
||||
'isSecondaryDevice'
|
||||
);
|
||||
|
||||
if (!primaryWithSecondary && !isSecondary) {
|
||||
return;
|
||||
}
|
||||
if (!primaryWithSecondary && !isSecondary) {
|
||||
return;
|
||||
}
|
||||
|
||||
const opts = {
|
||||
hideCancel: true,
|
||||
title: window.i18n('multiDeviceDisabledTemporaryTitle'),
|
||||
message: primaryWithSecondary ? window.i18n('multiDeviceDisabledTemporaryDescriptionPrimary') : window.i18n('multiDeviceDisabledTemporaryDescriptionSecondary')
|
||||
,
|
||||
};
|
||||
window.Whisper.events.trigger('showConfirmationDialog', opts);
|
||||
},
|
||||
1000
|
||||
);
|
||||
const opts = {
|
||||
hideCancel: true,
|
||||
title: window.i18n('multiDeviceDisabledTemporaryTitle'),
|
||||
message: primaryWithSecondary
|
||||
? 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 (
|
||||
<div>
|
||||
{this.renderContinueYourSessionButton()}
|
||||
{/*<h4>{or}</h4>*/}
|
||||
{/*<h4>{or}</h4>*/}
|
||||
{/* FIXME enable back to allow linking of device
|
||||
this.renderLinkDeviceToExistingAccountButton()*/}
|
||||
</div>
|
||||
|
|
|
@ -62,7 +62,11 @@ export class SessionConfirm extends React.Component<Props> {
|
|||
{!showHeader && <div className="spacer-lg" />}
|
||||
|
||||
<div className="session-modal__centered">
|
||||
<SessionHtmlRenderer tag="span" className={messageSubText} html={message} />
|
||||
<SessionHtmlRenderer
|
||||
tag="span"
|
||||
className={messageSubText}
|
||||
html={message}
|
||||
/>
|
||||
{messageSub && (
|
||||
<span className="session-confirm-sub-message subtle">
|
||||
{messageSub}
|
||||
|
|
Loading…
Reference in New Issue