mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #1261 from gradido/1240-Account-not-activated-needs-a-button-to-login-page
1240 account not activated needs a button to login page
This commit is contained in:
commit
7e4f7badb4
@ -28,6 +28,9 @@ const createMockObject = (comingFrom) => {
|
|||||||
optin: '123',
|
optin: '123',
|
||||||
comingFrom,
|
comingFrom,
|
||||||
},
|
},
|
||||||
|
path: {
|
||||||
|
includes: (t) => t,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
$toasted: {
|
$toasted: {
|
||||||
global: {
|
global: {
|
||||||
|
|||||||
@ -5,10 +5,10 @@
|
|||||||
<div class="header-body text-center mb-7">
|
<div class="header-body text-center mb-7">
|
||||||
<b-row class="justify-content-center">
|
<b-row class="justify-content-center">
|
||||||
<b-col xl="5" lg="6" md="8" class="px-2">
|
<b-col xl="5" lg="6" md="8" class="px-2">
|
||||||
<h1>{{ $t('settings.password.reset') }}</h1>
|
<h1>{{ $t(displaySetup.authenticated) }}</h1>
|
||||||
<div class="pb-4">
|
<div class="pb-4">
|
||||||
<span>
|
<span>
|
||||||
{{ $t('settings.password.reset-password.text') }}
|
{{ $t(displaySetup.notAuthenticated) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
@ -49,14 +49,14 @@ import { setPassword } from '../../graphql/mutations'
|
|||||||
|
|
||||||
const textFields = {
|
const textFields = {
|
||||||
reset: {
|
reset: {
|
||||||
authenticated: 'settings.password.reset-password.text',
|
authenticated: 'settings.password.change-password',
|
||||||
notAuthenticated: 'settings.password.not-authenticated',
|
notAuthenticated: 'settings.password.reset-password.text',
|
||||||
button: 'settings.password.reset',
|
button: 'settings.password.change-password',
|
||||||
linkTo: '/login',
|
linkTo: '/login',
|
||||||
},
|
},
|
||||||
checkEmail: {
|
checkEmail: {
|
||||||
authenticated: 'settings.password.set-password.text',
|
authenticated: 'settings.password.set',
|
||||||
notAuthenticated: 'settings.password.not-authenticated',
|
notAuthenticated: 'settings.password.set-password.text',
|
||||||
button: 'settings.password.set',
|
button: 'settings.password.set',
|
||||||
linkTo: '/login',
|
linkTo: '/login',
|
||||||
},
|
},
|
||||||
@ -95,19 +95,17 @@ export default {
|
|||||||
this.$router.push('/thx/reset')
|
this.$router.push('/thx/reset')
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (error.message.includes('Code is older than 10 minutes')) {
|
this.$toasted.global.error(error.message)
|
||||||
this.$toasted.global.error(error.message)
|
if (error.message.includes('Code is older than 10 minutes'))
|
||||||
this.$router.push('/password/reset')
|
this.$router.push('/password/reset')
|
||||||
} else {
|
|
||||||
this.$toasted.global.error(error.message)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
setDisplaySetup() {
|
setDisplaySetup() {
|
||||||
if (!this.$route.params.comingFrom) {
|
if (this.$route.path.includes('checkEmail')) {
|
||||||
|
this.displaySetup = textFields.checkEmail
|
||||||
|
}
|
||||||
|
if (this.$route.path.includes('reset')) {
|
||||||
this.displaySetup = textFields.reset
|
this.displaySetup = textFields.reset
|
||||||
} else {
|
|
||||||
this.displaySetup = textFields[this.$route.params.comingFrom]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user