diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index be4574e6d..558de7813 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -85,7 +85,9 @@ }, "thx": { "title": "Danke!", - "subtitle": "Wir haben dir eine eMail gesendet." + "email": "Wir haben dir eine eMail gesendet.", + "reset": "Dein Passwort wurde geändert", + "register": "Du bist jetzt regisriert" }, "overview":{ "account_overview":"Kontoübersicht", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index d9a3d278b..2daa1696f 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -85,7 +85,9 @@ }, "thx": { "title": "Thank you!", - "subtitle": "We have sent you an email." + "email": "We have sent you an email.", + "reset": "Your password has been changed", + "register": "You are registred now" }, "overview":{ "account_overview":"Account overview", diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index e9bcf38c8..0021aa1ed 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -49,6 +49,14 @@ const routes = [ { path: '/thx', component: () => import('../views/Pages/thx.vue'), + beforeEnter: (to, from, next) => { + const validFrom = ['/password', '/reset', '/register'] + if (!validFrom.includes(from.path)) { + next({ path: '/login' }) + } else { + next() + } + }, }, { path: '/password', diff --git a/frontend/src/views/Pages/ResetPassword.vue b/frontend/src/views/Pages/ResetPassword.vue index de5f256d6..c24a33257 100644 --- a/frontend/src/views/Pages/ResetPassword.vue +++ b/frontend/src/views/Pages/ResetPassword.vue @@ -107,6 +107,10 @@ export default { const result = await loginAPI.changePassword(this.sessionId, this.email, this.password) if (result.success) { this.password = '' + this.$store.dispatch('login', { + sessionId: result.result.data.session_id, + email: result.result.data.user.email, + }) this.$router.push('/thx') } else { alert(result.result.message) diff --git a/frontend/src/views/Pages/thx.vue b/frontend/src/views/Pages/thx.vue index db0b967d6..53db302a9 100644 --- a/frontend/src/views/Pages/thx.vue +++ b/frontend/src/views/Pages/thx.vue @@ -5,12 +5,54 @@ {{ $t('site.thx.title') }} - {{ $t('site.thx.subtitle') }} + {{ $t(displaySetup.subtitle) }} - {{ $t('login') }} + {{ $t(displaySetup.button) }} +
{{ $t('site.thx.title') }}
{{ $t('site.thx.subtitle') }}
{{ $t(displaySetup.subtitle) }}