From 03faac6ecbc4d6d1c3f56eb5349fd9dac00dfb70 Mon Sep 17 00:00:00 2001 From: elweyn Date: Tue, 7 Dec 2021 10:14:52 +0100 Subject: [PATCH] Case where a user has not activated his email he gets redirected to /thx/login with a message to check his eamils. --- frontend/src/routes/routes.js | 2 +- frontend/src/views/Pages/ForgotPassword.vue | 1 - frontend/src/views/Pages/Login.vue | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index 26f21f9cf..418422997 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -50,7 +50,7 @@ const routes = [ path: '/thx/:comingFrom', component: () => import('../views/Pages/thx.vue'), beforeEnter: (to, from, next) => { - const validFrom = ['password', 'reset', 'register', 'login'] + const validFrom = ['password', 'reset', 'register', 'login', 'Login'] if (!validFrom.includes(from.path.split('/')[1])) { next({ path: '/login' }) } else { diff --git a/frontend/src/views/Pages/ForgotPassword.vue b/frontend/src/views/Pages/ForgotPassword.vue index c27afae6a..c8b31246f 100644 --- a/frontend/src/views/Pages/ForgotPassword.vue +++ b/frontend/src/views/Pages/ForgotPassword.vue @@ -88,7 +88,6 @@ export default { }, }, created() { - console.log('comingFrom', this.$route.params.comingFrom) if (this.$route.params.comingFrom) { this.displaySetup = textFields[this.$route.params.comingFrom] } else { diff --git a/frontend/src/views/Pages/Login.vue b/frontend/src/views/Pages/Login.vue index 45e700099..5f86b1600 100755 --- a/frontend/src/views/Pages/Login.vue +++ b/frontend/src/views/Pages/Login.vue @@ -105,11 +105,11 @@ export default { loader.hide() }) .catch((error) => { - if (!error.message.includes('user email not validated')) { + 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') + this.$router.push('/reset/login') } loader.hide() })