Added a no-email-verify to locale check if the error message contains the message email not verified then throw another message than normal.

This commit is contained in:
elweyn 2021-11-12 07:38:57 +01:00
parent 4389e47cab
commit 14db7bd058
3 changed files with 9 additions and 4 deletions

View File

@ -46,7 +46,8 @@
"change-password": "Fehler beim Ändern des Passworts",
"error": "Fehler",
"no-account": "Leider konnten wir keinen Account finden mit diesen Daten!",
"session-expired": "Sitzung abgelaufen!"
"session-expired": "Sitzung abgelaufen!",
"no-email-verify": "Email wurde noch nicht bestätigt, bitte überprüfen Sie ihre Emails und clicken Sie den Registrierungslink!"
},
"form": {
"amount": "Betrag",

View File

@ -46,7 +46,8 @@
"change-password": "Error while changing password",
"error": "Error",
"no-account": "Unfortunately we could not find an account to the given data!",
"session-expired": "The session expired"
"session-expired": "The session expired",
"no-email-verify": "Your email is not validated yet, please check your emails and click on the activation link!"
},
"form": {
"amount": "Amount",

View File

@ -102,9 +102,12 @@ export default {
this.$router.push('/overview')
loader.hide()
})
.catch(() => {
.catch((error) => {
loader.hide()
this.$toasted.error(this.$t('error.no-account'))
const toastedError = !error.message.includes('user email not validated')
? this.$t('error.no-account')
: this.$t('error.no-email-verify')
this.$toasted.error(toastedError)
})
},
async onCreated() {