From e830e6a5e54f6ef3f3aa6ce0fc48a1810a4d54e1 Mon Sep 17 00:00:00 2001 From: Dimitrie Stefanescu Date: Fri, 8 Apr 2022 21:14:38 +0100 Subject: [PATCH] fix(frontend): displays toast post email verification, closes #672 --- packages/frontend/src/main/layouts/TheMain.vue | 8 ++++++++ packages/server/modules/emails/rest/index.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/main/layouts/TheMain.vue b/packages/frontend/src/main/layouts/TheMain.vue index ff09ebe12..078112360 100644 --- a/packages/frontend/src/main/layouts/TheMain.vue +++ b/packages/frontend/src/main/layouts/TheMain.vue @@ -141,6 +141,14 @@ export default { this.$mixpanel.people.set('Identified', true) } this.$mixpanel.track('Visit Web App') + + if (this.$route.query.emailverfiedstatus) { + setTimeout(() => { + this.$eventHub.$emit('notification', { + text: '✉️ Email succesfully verfied!' + }) + }, 1000) // todo: ask fabian if there's a better way, feels icky + } }, methods: { switchTheme() { diff --git a/packages/server/modules/emails/rest/index.js b/packages/server/modules/emails/rest/index.js index e1659130f..661eeb9cb 100644 --- a/packages/server/modules/emails/rest/index.js +++ b/packages/server/modules/emails/rest/index.js @@ -55,6 +55,6 @@ module.exports = (app) => { await Users().where({ email: verification.email }).update({ verified: true }) await Verifications().where({ id: req.query.t }).del() - return res.redirect('/') + return res.redirect('/?emailverfiedstatus=true') }) }