Polish 2fa setup ui

This commit is contained in:
Johannes Zellner
2025-03-29 20:56:36 +01:00
parent f0f04ce3ff
commit 67bc03bcc1
3 changed files with 6 additions and 4 deletions
+5 -2
View File
@@ -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',