From a4aabfc3695f9db9295840d4b6b917be6f49344d Mon Sep 17 00:00:00 2001 From: elweyn Date: Fri, 11 Mar 2022 08:45:31 +0100 Subject: [PATCH] Changes coming from new changes added in here. --- frontend/src/pages/Login.vue | 2 ++ frontend/src/pages/thx.spec.js | 4 ++-- frontend/src/pages/thx.vue | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index 57b97200d..8546bf30b 100755 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -107,8 +107,10 @@ export default { .catch((error) => { this.toastError(this.$t('error.no-account')) if (error.message.includes('User email not validated')) { + this.$store.commit('email', this.form.email) this.$router.push('/thx/login') } else if (error.message.includes('User has no password set yet')) { + this.$store.commit('email', this.form.email) this.$router.push('/reset-password/login') } loader.hide() diff --git a/frontend/src/pages/thx.spec.js b/frontend/src/pages/thx.spec.js index 9cb40e7e2..0ba19bf03 100644 --- a/frontend/src/pages/thx.spec.js +++ b/frontend/src/pages/thx.spec.js @@ -102,8 +102,8 @@ describe('Thx', () => { expect(wrapper.find('a.btn').text()).toBe('settings.password.reset') }) - it('links the redirect button to /password', () => { - expect(wrapper.find('a.btn').attributes('href')).toBe('/password') + it('links the redirect button to /forgot-password', () => { + expect(wrapper.find('a.btn').attributes('href')).toBe('/forgot-password') }) }) }) diff --git a/frontend/src/pages/thx.vue b/frontend/src/pages/thx.vue index a6a4edae1..5f267bd63 100644 --- a/frontend/src/pages/thx.vue +++ b/frontend/src/pages/thx.vue @@ -46,13 +46,13 @@ const textFields = { headline: 'site.thx.errorTitle', subtitle: 'site.thx.activateEmail', button: 'settings.password.reset', - linkTo: '/password', + linkTo: '/forgot-password', }, resetFailed: { headline: 'site.thx.errorTitle', subtitle: 'site.thx.resetPassword', button: 'settings.password.reset', - linkTo: '/password', + linkTo: '/forgot-password', }, }