TOTP UX improvements & translation fixes

This commit is contained in:
kolaente 2021-07-30 12:23:31 +02:00
parent f9831f8e47
commit 8f84594e92
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 9 additions and 2 deletions

View File

@ -28,7 +28,7 @@
"passwordPlaceholder": "e.g. •••••••••••",
"resetPassword": "Reset your password",
"resetPasswordAction": "Send me a password reset link",
"restPasswordSuccess": "Check your inbox! You should have an e-mail with instructions on how to reset your password.",
"resetPasswordSuccess": "Check your inbox! You should have an e-mail with instructions on how to reset your password.",
"passwordsDontMatch": "Passwords don't match",
"confirmEmailSuccess": "You successfully confirmed your email! You can log in now.",
"totpTitle": "Two Factor Authentication Code",

View File

@ -184,7 +184,14 @@ export default {
}
this.$store.dispatch('auth/login', credentials)
.then(() => {
this.$store.commit('auth/needsTotpPasscode', false)
})
.catch(e => {
if (e.response && e.response.data.code === 1017 && !credentials.totpPasscode) {
return
}
const err = getErrorText(e, p => this.$t(p))
if (typeof err[1] !== 'undefined') {
this.$store.commit(ERROR_MESSAGE, err[1])

View File

@ -39,7 +39,7 @@
:loading="this.passwordResetService.loading"
@click="submit"
>
{{ $t('user.auth.resetPassoword') }}
{{ $t('user.auth.resetPassword') }}
</x-button>
</div>
</div>