From 21a968286296ee605932b7cbc21b44fc008405e8 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Mon, 17 Jun 2024 04:52:15 -0400 Subject: [PATCH] refactor(editor): Migrate `MfaView.vue` to use script setup (no-changelog) (#9764) --- packages/editor-ui/src/constants.ts | 5 + packages/editor-ui/src/views/MfaView.vue | 284 +++++++++++--------- packages/editor-ui/src/views/SigninView.vue | 8 +- 3 files changed, 166 insertions(+), 131 deletions(-) diff --git a/packages/editor-ui/src/constants.ts b/packages/editor-ui/src/constants.ts index 9a6cc0327..7f47a553a 100644 --- a/packages/editor-ui/src/constants.ts +++ b/packages/editor-ui/src/constants.ts @@ -690,6 +690,11 @@ export const EXPERIMENTS_TO_TRACK = [ CANVAS_AUTO_ADD_MANUAL_TRIGGER_EXPERIMENT.name, ]; +export const MFA_FORM = { + MFA_TOKEN: 'MFA_TOKEN', + MFA_RECOVERY_CODE: 'MFA_RECOVERY_CODE', +} as const; + export const MFA_AUTHENTICATION_REQUIRED_ERROR_CODE = 998; export const MFA_AUTHENTICATION_TOKEN_WINDOW_EXPIRED = 997; diff --git a/packages/editor-ui/src/views/MfaView.vue b/packages/editor-ui/src/views/MfaView.vue index 53f081942..1b8bc0761 100644 --- a/packages/editor-ui/src/views/MfaView.vue +++ b/packages/editor-ui/src/views/MfaView.vue @@ -7,8 +7,8 @@
{{ showRecoveryCodeForm - ? $locale.baseText('mfa.recovery.modal.title') - : $locale.baseText('mfa.code.modal.title') + ? i18.baseText('mfa.recovery.modal.title') + : i18.baseText('mfa.code.modal.title') }}
@@ -26,9 +26,9 @@ size="small" color="text-base" :bold="false" - >{{ $locale.baseText('mfa.code.input.info') }} + >{{ i18.baseText('mfa.code.input.info') }} {{ - $locale.baseText('mfa.code.input.info.action') + i18.baseText('mfa.code.input.info.action') }} - {{ $locale.baseText('mfa.recovery.input.info.action') }}
@@ -49,8 +49,8 @@ :loading="verifyingMfaToken" :label=" showRecoveryCodeForm - ? $locale.baseText('mfa.recovery.button.verify') - : $locale.baseText('mfa.code.button.continue') + ? i18.baseText('mfa.recovery.button.verify') + : i18.baseText('mfa.code.button.continue') " size="large" :disabled="!hasAnyChanges" @@ -58,7 +58,7 @@ /> -