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', () => {
|
describe('after animation', () => {
|
||||||
beforeEach(jest.runAllTimers)
|
beforeEach(jest.runAllTimers)
|
||||||
|
|
||||||
it('emits `submitted`', () => {
|
it('emits `handleSubmitted`', () => {
|
||||||
expect(wrapper.emitted('submitted')).toBeTruthy()
|
expect(wrapper.emitted('handleSubmitted')).toBeTruthy()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -96,8 +96,8 @@ export default {
|
|||||||
this.submitted = true
|
this.submitted = true
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$emit('submitted')
|
this.$emit('handleSubmitted')
|
||||||
}, 1000)
|
}, 3000)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.$toast.error(err.message)
|
this.$toast.error(err.message)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
<ds-flex>
|
<ds-flex>
|
||||||
<ds-flex-item :width="{ base: '100%' }" centered>
|
<ds-flex-item :width="{ base: '100%' }" centered>
|
||||||
<ds-space style="text-align: center;" margin-top="small" margin-bottom="xxx-small" 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-space>
|
||||||
</ds-flex-item>
|
</ds-flex-item>
|
||||||
</ds-flex>
|
</ds-flex>
|
||||||
@ -12,11 +13,23 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PasswordReset from '~/components/PasswordReset/PasswordReset'
|
import PasswordReset from '~/components/PasswordReset/PasswordReset'
|
||||||
|
import VerifyCode from '~/components/PasswordReset/VerifyCode'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
layout: 'default',
|
layout: 'default',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
submitted: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
PasswordReset,
|
PasswordReset,
|
||||||
}
|
VerifyCode,
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSubmitted() {
|
||||||
|
this.submitted = true
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user