From acd4fbee40e01dc09af28079b5f8a8ebca070a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 2 May 2022 10:29:19 +0200 Subject: [PATCH] Refactor ResetPassword, next step --- frontend/src/pages/ResetPassword.vue | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/ResetPassword.vue b/frontend/src/pages/ResetPassword.vue index a411592fd..a0f7b7db4 100644 --- a/frontend/src/pages/ResetPassword.vue +++ b/frontend/src/pages/ResetPassword.vue @@ -48,10 +48,10 @@
@@ -96,7 +96,10 @@ export default { }, displaySetup: {}, showPageMessage: false, - errorMessage: '', + messageHeadline: null, + messageSubtitle: null, + messageButtonText: null, + messageButtonLinktTo: null, } }, methods: { @@ -113,11 +116,14 @@ export default { this.form.password = '' if (this.$route.path.includes('checkEmail')) { if (this.$route.params.code) { + // Wolle: refactor this.$router.push('/thx/checkEmail/' + this.$route.params.code) } else { + // Wolle: refactor this.$router.push('/thx/checkEmail') } } else { + // Wolle: refactor this.$router.push('/thx/resetPassword') } }) @@ -135,8 +141,11 @@ export default { errorMessage = error.message } this.showPageMessage = true + this.messageHeadline = this.$t('site.thx.errorTitle') + this.messageSubtitle = errorMessage + this.messageButtonText = this.$t('settings.password.reset') + this.messageButtonLinktTo = '/forgot-password/resetPassword' this.toastError(errorMessage) - this.errorSubtitle = errorMessage }) }, checkOptInCode() {