TOTP UX improvements & translation fixes

This commit is contained in:
kolaente 2021-07-30 12:23:31 +02:00
parent f9831f8e47
commit 8f84594e92
No known key found for this signature in database
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>