fix: use watcher to check for user query tokens

This commit is contained in:
kolaente 2021-12-12 12:20:33 +01:00
parent a106511646
commit 807fb6a9fe
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -48,9 +48,6 @@ export default defineComponent({
}, },
beforeMount() { beforeMount() {
this.setupOnlineStatus() this.setupOnlineStatus()
this.setupPasswortResetRedirect()
this.setupEmailVerificationRedirect()
this.setupAccountDeletionVerification()
}, },
beforeCreate() { beforeCreate() {
setLanguage() setLanguage()
@ -64,6 +61,18 @@ export default defineComponent({
this.$router.push({name: 'home'}) this.$router.push({name: 'home'})
} }
}, },
watch: {
// Calling these methods in the mounted hook directly does not work.
'$route.query.accountDeletionConfirm'() {
this.setupAccountDeletionVerification()
},
'$route.query.userPasswordReset'() {
this.setupPasswortResetRedirect()
},
'$route.query.userEmailConfirm'() {
this.setupEmailVerificationRedirect()
},
},
computed: { computed: {
isTouch() { isTouch() {
return isTouchDevice() return isTouchDevice()