Polish 2fa setup ui
This commit is contained in:
@@ -192,7 +192,11 @@ async function onOpenTwoFASetupDialog(modal = false) {
|
||||
|
||||
async function onTwoFAEnable() {
|
||||
const [error] = await profileModel.enableTwoFA(twoFATotpToken.value);
|
||||
if (error) return twoFAEnableError.value = error.body ? error.body.message : 'Internal error';
|
||||
if (error) {
|
||||
twoFATotpToken.value = '';
|
||||
return twoFAEnableError.value = error.body ? error.body.message : 'Internal error';
|
||||
}
|
||||
|
||||
await refreshProfile();
|
||||
|
||||
twoFADialog.value.close();
|
||||
@@ -204,7 +208,6 @@ async function onTwoFADisable() {
|
||||
modal: true,
|
||||
placeholder: t('appstore.accountDialog.password'),
|
||||
type: 'password',
|
||||
confirmStyle: 'danger',
|
||||
confirmLabel: t('main.dialog.yes'),
|
||||
rejectLabel: t('main.dialog.no'),
|
||||
rejectStyle: 'secondary',
|
||||
|
||||
Reference in New Issue
Block a user