diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index ad4566070..25f83bb09 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -554,7 +554,7 @@ export class UserResolver { await queryRunner.startTransaction('READ UNCOMMITTED') try { - if (coinanimation) { + if (coinanimation !== null && coinanimation !== undefined) { queryRunner.manager .getCustomRepository(UserSettingRepository) .setOrUpdate(userEntity.id, Setting.COIN_ANIMATION, coinanimation.toString()) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 0dd3ba926..faa61886d 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -46,6 +46,7 @@ "change-password": "Fehler beim Ändern des Passworts", "error": "Fehler", "no-account": "Leider konnten wir keinen Account finden mit diesen Daten!", + "no-email-verify": "Die Email wurde noch nicht bestätigt, bitte überprüfe deine Emails und klicke auf den Aktivierungslink!", "session-expired": "Sitzung abgelaufen!" }, "form": { @@ -180,9 +181,12 @@ "uppercase": "Ein Großbuchstabe erforderlich." }, "thx": { + "activateEmail": "Deine Email wurde noch nicht aktiviert, bitte überprüfe deine Email und Klicke den Aktivierungslink!", "checkEmail": "Deine Email würde erfolgreich verifiziert.", "email": "Wir haben dir eine eMail gesendet.", - "register": "Du bist jetzt registriert.", + "emailActivated": "Danke dass Du deine Email bestätigt hast.", + "errorTitle": "Achtung!", + "register": "Du bist jetzt registriert, bitte überprüfe deine Emails und klicke auf den Aktivierungslink.", "reset": "Dein Passwort wurde geändert.", "title": "Danke!" } diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 99fcd46a7..91e25f61d 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -46,6 +46,7 @@ "change-password": "Error while changing password", "error": "Error", "no-account": "Unfortunately we could not find an account to the given data!", + "no-email-verify": "Your email is not activated yet, please check your emails and click the activation link!", "session-expired": "The session expired" }, "form": { @@ -180,9 +181,12 @@ "uppercase": "One uppercase letter required." }, "thx": { + "activateEmail": "Your email has not been activated yet, please check your emails and click the activation link!", "checkEmail": "Your email has been successfully verified.", "email": "We have sent you an email.", - "register": "You are registred now.", + "emailActivated": "Thank you your email has been activated.", + "errorTitle": "Attention!", + "register": "You are registered now, please check your emails and click the activation link.", "reset": "Your password has been changed.", "title": "Thank you!" } diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index f4f0dfe04..a3c1389ce 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -47,7 +47,7 @@ const routes = [ path: '/thx/:comingFrom', component: () => import('../views/Pages/thx.vue'), beforeEnter: (to, from, next) => { - const validFrom = ['password', 'reset', 'register'] + const validFrom = ['password', 'reset', 'register', 'login'] if (!validFrom.includes(from.path.split('/')[1])) { next({ path: '/login' }) } else { diff --git a/frontend/src/views/Pages/Login.vue b/frontend/src/views/Pages/Login.vue index de1ae993a..45e700099 100755 --- a/frontend/src/views/Pages/Login.vue +++ b/frontend/src/views/Pages/Login.vue @@ -104,9 +104,14 @@ export default { this.$router.push('/overview') loader.hide() }) - .catch(() => { + .catch((error) => { + if (!error.message.includes('user email not validated')) { + this.$toasted.error(this.$t('error.no-account')) + } else { + // : this.$t('error.no-email-verify') + this.$router.push('/thx/login') + } loader.hide() - this.$toasted.error(this.$t('error.no-account')) }) }, }, diff --git a/frontend/src/views/Pages/Register.vue b/frontend/src/views/Pages/Register.vue index 00114eb04..ea4000cff 100755 --- a/frontend/src/views/Pages/Register.vue +++ b/frontend/src/views/Pages/Register.vue @@ -161,6 +161,7 @@ import InputEmail from '../../components/Inputs/InputEmail.vue' import InputPasswordConfirmation from '../../components/Inputs/InputPasswordConfirmation.vue' import LanguageSwitchSelect from '../../components/LanguageSwitchSelect.vue' import { registerUser } from '../../graphql/mutations' +import { localeChanged } from 'vee-validate' import { getCommunityInfoMixin } from '../../mixins/getCommunityInfo' export default { @@ -189,6 +190,9 @@ export default { methods: { updateLanguage(e) { this.language = e + this.$store.commit('language', this.language) + this.$i18n.locale = this.language + localeChanged(this.language) }, getValidationState({ dirty, validated, valid = null }) { return dirty || validated ? valid : null diff --git a/frontend/src/views/Pages/thx.vue b/frontend/src/views/Pages/thx.vue index 9d9143456..5884cc61c 100644 --- a/frontend/src/views/Pages/thx.vue +++ b/frontend/src/views/Pages/thx.vue @@ -4,10 +4,12 @@
{{ $t('site.thx.title') }}
+{{ $t(displaySetup.headline) }}
{{ $t(displaySetup.subtitle) }}