diff --git a/frontend/src/components/auth/PendingOAuthCreateAccountForm.vue b/frontend/src/components/auth/PendingOAuthCreateAccountForm.vue index 8e05617f..a566e264 100644 --- a/frontend/src/components/auth/PendingOAuthCreateAccountForm.vue +++ b/frontend/src/components/auth/PendingOAuthCreateAccountForm.vue @@ -5,7 +5,7 @@ :data-testid="`${testIdPrefix}-create-account-email`" type="email" class="input w-full" - placeholder="you@example.com" + :placeholder="t('auth.emailPlaceholder')" :disabled="isSubmitting || isSendingCode" />
@@ -26,16 +26,16 @@ />
- + maxlength="6" + class="input min-w-0 flex-1" + placeholder="123456" + :disabled="isSubmitting" + /> - -

- {{ sendCodeError }} -

-
- -

- {{ errorMessage }} -

-
@@ -102,6 +92,7 @@ import { onMounted, onUnmounted, ref, watch } from 'vue' import { useI18n } from 'vue-i18n' import TurnstileWidget from '@/components/TurnstileWidget.vue' import { getPublicSettings, sendPendingOAuthVerifyCode } from '@/api/auth' +import { useAppStore } from '@/stores' export type PendingOAuthCreateAccountPayload = { email: string @@ -123,6 +114,7 @@ const emit = defineEmits<{ }>() const { t } = useI18n() +const appStore = useAppStore() const email = ref('') const password = ref('') @@ -148,6 +140,21 @@ watch( { immediate: true } ) +watch(sendCodeError, value => { + if (value) { + appStore.showError(value) + } +}) + +watch( + () => props.errorMessage, + value => { + if (value) { + appStore.showError(value) + } + } +) + function clearCountdown() { if (countdownTimer) { clearInterval(countdownTimer) diff --git a/frontend/src/components/auth/TotpLoginModal.vue b/frontend/src/components/auth/TotpLoginModal.vue index 03fa718d..0ae2f482 100644 --- a/frontend/src/components/auth/TotpLoginModal.vue +++ b/frontend/src/components/auth/TotpLoginModal.vue @@ -47,11 +47,6 @@
- -
- {{ error }} -
- @@ -124,13 +118,13 @@

- Choose how to continue + {{ t('auth.oauthFlow.chooseHowToContinue') }}

{{ pendingAccountEmail - ? `Suggested email: ${pendingAccountEmail}` - : `Choose whether to bind an existing ${providerName} account or create a new one.` + ? t('auth.oauthFlow.suggestedEmail', { email: pendingAccountEmail }) + : t('auth.oauthFlow.chooseAccountActionHint') }}

@@ -141,14 +135,14 @@ :disabled="isSubmitting" @click="switchToBindLoginMode()" > - Bind existing account + {{ t('auth.oauthFlow.bindExistingAccount') }}
@@ -157,7 +151,7 @@ - - -
-
-
- -
-
-

- {{ errorMessage }} -

- - {{ t('auth.oidc.backToLogin') }} - -
-
-
-