mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
PW-Reset page switches password reset and verify
This commit is contained in:
parent
aa6855434d
commit
edd6a3f0c3
@ -68,8 +68,8 @@ describe('PasswordReset', () => {
|
||||
describe('after animation', () => {
|
||||
beforeEach(jest.runAllTimers)
|
||||
|
||||
it('emits `submitted`', () => {
|
||||
expect(wrapper.emitted('submitted')).toBeTruthy()
|
||||
it('emits `handleSubmitted`', () => {
|
||||
expect(wrapper.emitted('handleSubmitted')).toBeTruthy()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -96,8 +96,8 @@ export default {
|
||||
this.submitted = true
|
||||
|
||||
setTimeout(() => {
|
||||
this.$emit('submitted')
|
||||
}, 1000)
|
||||
this.$emit('handleSubmitted')
|
||||
}, 3000)
|
||||
} catch (err) {
|
||||
this.$toast.error(err.message)
|
||||
}
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
<ds-flex>
|
||||
<ds-flex-item :width="{ base: '100%' }" centered>
|
||||
<ds-space style="text-align: center;" margin-top="small" margin-bottom="xxx-small" centered>
|
||||
<password-reset />
|
||||
<password-reset @handleSubmitted="handleSubmitted" v-if="!submitted" />
|
||||
<verify-code v-else />
|
||||
</ds-space>
|
||||
</ds-flex-item>
|
||||
</ds-flex>
|
||||
@ -12,11 +13,23 @@
|
||||
|
||||
<script>
|
||||
import PasswordReset from '~/components/PasswordReset/PasswordReset'
|
||||
import VerifyCode from '~/components/PasswordReset/VerifyCode'
|
||||
|
||||
export default {
|
||||
layout: 'default',
|
||||
data() {
|
||||
return {
|
||||
submitted: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
PasswordReset,
|
||||
}
|
||||
VerifyCode,
|
||||
},
|
||||
methods: {
|
||||
handleSubmitted() {
|
||||
this.submitted = true
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user