No more modal for dialogs
This commit is contained in:
@@ -55,7 +55,6 @@ async function onSendTestMail() {
|
||||
confirmLabel: t('emails.testMailDialog.sendAction'),
|
||||
rejectLabel: t('main.dialog.cancel'),
|
||||
rejectStyle: 'secondary',
|
||||
modal: false,
|
||||
});
|
||||
|
||||
if (!address) return;
|
||||
@@ -87,7 +86,6 @@ async function onAskIncomingToggle(value) {
|
||||
confirmLabel: t('email.disableEmailDialog.disableAction'),
|
||||
rejectLabel: t('main.dialog.cancel'),
|
||||
rejectStyle: 'secondary',
|
||||
modal: false,
|
||||
});
|
||||
|
||||
// reset switch
|
||||
|
||||
@@ -57,7 +57,6 @@ async function refreshProfile() {
|
||||
async function onChangeDisplayName(currentDisplayName) {
|
||||
const displayName = await inputDialog.value.prompt({
|
||||
message: t('profile.changeDisplayName.title'),
|
||||
modal: false,
|
||||
value: currentDisplayName,
|
||||
confirmLabel: t('main.dialog.save'),
|
||||
confirmStyle: 'primary',
|
||||
@@ -112,18 +111,16 @@ async function onRevokeAllWebAndCliTokens() {
|
||||
|
||||
// 2fa
|
||||
const mandatory2FAHelp = ref('');
|
||||
const twoFAModal = ref(false);
|
||||
const twoFASecret = ref('');
|
||||
const twoFATotpToken = ref('');
|
||||
const twoFAQRCode = ref('');
|
||||
const twoFAEnableError = ref('');
|
||||
const twoFADialog = useTemplateRef('twoFADialog');
|
||||
|
||||
async function onOpenTwoFASetupDialog(modal = false) {
|
||||
async function onOpenTwoFASetupDialog() {
|
||||
const [error, result] = await profileModel.setTwoFASecret();
|
||||
if (error) return console.error(error);
|
||||
|
||||
twoFAModal.value = modal;
|
||||
twoFAEnableError.value = '';
|
||||
twoFATotpToken.value = '';
|
||||
twoFASecret.value = result.secret;
|
||||
@@ -177,7 +174,7 @@ onMounted(async () => {
|
||||
cliTokens.value = result.filter(function (c) { return c.clientId === TOKEN_TYPES.ID_CLI; });
|
||||
|
||||
// check if we should show the 2fa setup
|
||||
if (window.location.hash.indexOf('setup2fa') !== -1) onOpenTwoFASetupDialog(true /* modal */);
|
||||
if (window.location.hash.indexOf('setup2fa') !== -1) onOpenTwoFASetupDialog();
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -190,7 +187,7 @@ onMounted(async () => {
|
||||
<PasswordChangeDialog ref="passwordChangeDialog" @success="refreshProfile"/>
|
||||
<DisableTwoFADialog ref="disableTwoFADialog" @success="refreshProfile"/>
|
||||
|
||||
<Dialog ref="twoFADialog" :title="$t('profile.enable2FA.title')" :show-x="!twoFAModal" :modal="twoFAModal">
|
||||
<Dialog ref="twoFADialog" :title="$t('profile.enable2FA.title')">
|
||||
<div style="text-align: center; max-width: 420px">
|
||||
<p v-show="mandatory2FAHelp">{{ $t('profile.enable2FA.description') }}</p>
|
||||
<p v-html="$t('profile.enable2FA.authenticatorAppDescription', { googleAuthenticatorPlayStoreLink: 'https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2', googleAuthenticatorITunesLink: 'https://itunes.apple.com/us/app/google-authenticator/id388497605', freeOTPPlayStoreLink: 'https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp', freeOTPITunesLink: 'https://itunes.apple.com/us/app/freeotp-authenticator/id872559395'})"></p>
|
||||
|
||||
Reference in New Issue
Block a user