From 264904e74109dd3798280ded2e6c8aa0fe30fa6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 5 May 2022 10:49:16 +0200 Subject: [PATCH] Avoid negation by changing showPageMessage into enterData after Alex suggestion --- frontend/src/pages/ForgotPassword.vue | 15 ++++++++++----- frontend/src/pages/Login.vue | 8 +++++++- frontend/src/pages/Register.vue | 5 ++++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/ForgotPassword.vue b/frontend/src/pages/ForgotPassword.vue index eea54427a..182df5bc3 100644 --- a/frontend/src/pages/ForgotPassword.vue +++ b/frontend/src/pages/ForgotPassword.vue @@ -13,7 +13,7 @@ - + @@ -75,6 +75,11 @@ export default { success: null, } }, + created() { + if (this.$route.params.comingFrom) { + this.subtitle = 'settings.password.resend_subtitle' + } + }, methods: { async onSubmit() { this.$apollo @@ -95,10 +100,10 @@ export default { }) }, }, - created() { - if (this.$route.params.comingFrom) { - this.subtitle = 'settings.password.resend_subtitle' - } + computed: { + enterData() { + return !this.showPageMessage + }, }, } diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index 4cfd62e69..bda36a0d2 100755 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -13,7 +13,7 @@ - + @@ -136,6 +136,7 @@ export default { this.toastError(this.$t('error.no-account')) } else { // appeared errors: 'GraphQL error: No user with this credentials' + // Wolle: avoid this error message! may be avoid in general? const errorMessage = this.$t('error.unknown-error') + error.message this.showPageMessage = true this.errorSubtitle = errorMessage @@ -146,5 +147,10 @@ export default { }) }, }, + computed: { + enterData() { + return !this.showPageMessage + }, + }, } diff --git a/frontend/src/pages/Register.vue b/frontend/src/pages/Register.vue index a41952030..d6b5f9dba 100755 --- a/frontend/src/pages/Register.vue +++ b/frontend/src/pages/Register.vue @@ -15,7 +15,7 @@ - + @@ -286,6 +286,9 @@ export default { disabled() { return !(this.namesFilled && this.emailFilled && this.form.agree && !!this.language) }, + enterData() { + return !this.showPageMessage + }, }, }