diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index b0dfe36d4..33e2290d8 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -146,6 +146,11 @@ "text": "Jetzt kannst du ein neues Passwort speichern, mit dem du dich zukünftig in der Gradido-App anmelden kannst." }, "send_now": "Jetzt senden", + "set": "Passwort festsetzen", + "set-password": { + "not-authenticated": "Leider konnten wir dich nicht authentifizieren. Bitte wende dich an den Support.", + "text": "Jetzt kannst du ein neues Passwort speichern, mit dem du dich zukünftig in der Gradido-App anmelden kannst." + }, "subtitle": "Wenn du dein Passwort vergessen hast, kannst du es hier zurücksetzen." } }, diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 135729ffa..5991ca7e6 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -141,11 +141,15 @@ "change-password": "Change password", "forgot_pwd": "Forgot password?", "reset": "Reset password", - "reset-password": { - "not-authenticated": "Unfortunately we could not authenticate you. Please contact the support.", + "not-authenticated": "Unfortunately we could not authenticate you. Please contact the support.", + "reset-password": { "text": "Now you can save a new password to login to the Gradido-App in the future." }, "send_now": "Send now", + "set": "Set password", + "set-password": { + "text": "Jetzt kannst du ein neues Passwort speichern, mit dem du dich zukünftig in der Gradido-App anmelden kannst." + }, "subtitle": "If you have forgotten your password, you can reset it here." } }, diff --git a/frontend/src/views/Pages/ResetPassword.spec.js b/frontend/src/views/Pages/ResetPassword.spec.js index 81ea7ed0f..fb607708b 100644 --- a/frontend/src/views/Pages/ResetPassword.spec.js +++ b/frontend/src/views/Pages/ResetPassword.spec.js @@ -72,9 +72,7 @@ describe('ResetPassword', () => { it('has a message suggesting to contact the support', () => { expect(wrapper.find('div.header').text()).toContain('settings.password.reset') - expect(wrapper.find('div.header').text()).toContain( - 'settings.password.reset-password.not-authenticated', - ) + expect(wrapper.find('div.header').text()).toContain('settings.password.not-authenticated') }) }) diff --git a/frontend/src/views/Pages/ResetPassword.vue b/frontend/src/views/Pages/ResetPassword.vue index 6fa04b899..83488ae11 100644 --- a/frontend/src/views/Pages/ResetPassword.vue +++ b/frontend/src/views/Pages/ResetPassword.vue @@ -26,7 +26,7 @@
- {{ $t('settings.password.reset') }} + {{ $t(displaySetup.button) }}
@@ -35,9 +35,9 @@ - + - {{ $t('back') }} + {{ $t('back') }} @@ -47,6 +47,25 @@ import InputPasswordConfirmation from '../../components/Inputs/InputPasswordConfirmation' import { setPassword } from '../../graphql/mutations' +const textFields = { + reset: { + authenticated: 'settings.password.reset-password.text', + notAuthenticated: 'settings.password.not-authenticated', + button: 'settings.password.reset', + linkTo: '/login', + }, + checkEmail: { + authenticated: 'settings.password.set-password.text', + notAuthenticated: 'settings.password.not-authenticated', + button: 'settings.password.set', + linkTo: '/login', + }, + login: { + headline: 'site.thx.errorTitle', + subtitle: 'site.thx.activateEmail', + }, +} + export default { name: 'ResetPassword', components: { @@ -82,9 +101,13 @@ export default { // TODO validate somehow if present and looks good? // const optin = this.$route.params.optin }, + setDisplaySetup(from) { + this.displaySetup = textFields[this.$route.params.comingFrom] + }, }, mounted() { this.authenticate() + this.setDisplaySetup() }, }