mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'login_call_resetPassword_frontend' into login_call_resetPassword
# Conflicts: # frontend/src/views/Pages/ResetPassword.vue
This commit is contained in:
commit
8427584cb7
@ -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."
|
||||
}
|
||||
},
|
||||
|
||||
@ -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."
|
||||
}
|
||||
},
|
||||
|
||||
@ -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')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<input-password-confirmation v-model="form" />
|
||||
<div class="text-center">
|
||||
<b-button type="submit" variant="primary" class="mt-4">
|
||||
{{ $t('settings.password.reset') }}
|
||||
{{ $t(displaySetup.button) }}
|
||||
</b-button>
|
||||
</div>
|
||||
</b-form>
|
||||
@ -35,9 +35,9 @@
|
||||
</b-card>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row>
|
||||
<b-row v-if="displaySetup.linkTo">
|
||||
<b-col class="text-center py-lg-4">
|
||||
<router-link to="/Login" class="mt-3">{{ $t('back') }}</router-link>
|
||||
<router-link :to="displaySetup.linkTo" class="mt-3">{{ $t('back') }}</router-link>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-container>
|
||||
@ -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()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user