From 0c63a6371c0e29b0f9dcd8cfb23d804137234d88 Mon Sep 17 00:00:00 2001 From: addshore Date: Fri, 25 Sep 2026 23:18:20 +0100 Subject: [PATCH 1/2] fix: sync signup availability with login request --- src/components/Cards/Login.vue | 2 ++ src/components/Pages/Login.vue | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Cards/Login.vue b/src/components/Cards/Login.vue index 2e8eddb5..acf7ae93 100644 --- a/src/components/Cards/Login.vue +++ b/src/components/Cards/Login.vue @@ -77,6 +77,7 @@ export default { login (evt) { evt.preventDefault() this.loggingIn = true + this.$emit('login-in-flight', true) const email = this.email const password = this.password this.errorMessage = '' @@ -96,6 +97,7 @@ export default { }) this.loggingIn = false + this.$emit('login-in-flight', false) }) }, }, diff --git a/src/components/Pages/Login.vue b/src/components/Pages/Login.vue index a4b3ce0c..396da1b0 100644 --- a/src/components/Pages/Login.vue +++ b/src/components/Pages/Login.vue @@ -2,7 +2,7 @@ - +
@@ -28,7 +28,9 @@ export default { LoginCard, }, data () { - return {} + return { + inFlight: false, + } }, } From 4e2f7d12215cab1c6cb4fab303bb8e6f6bafabb5 Mon Sep 17 00:00:00 2001 From: addshore Date: Fri, 25 Sep 2026 23:33:47 +0100 Subject: [PATCH 2/2] fix: restore form availability after requests --- src/components/Cards/CreateAccount.vue | 16 +++++++++++----- src/components/Cards/ForgottenPassword.vue | 3 +++ src/components/Pages/CreateAccount.vue | 6 ++++-- src/components/Pages/ManageWiki/Cards/Skin.vue | 8 +++++++- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/components/Cards/CreateAccount.vue b/src/components/Cards/CreateAccount.vue index 0af48906..6d8f821b 100644 --- a/src/components/Cards/CreateAccount.vue +++ b/src/components/Cards/CreateAccount.vue @@ -156,12 +156,16 @@ export default { this.error.inputPassword = error this.error.inputPasswordConfirmation = error this.error.terms = error - this.inFlight = false + this.setInFlight(false) + }, + setInFlight (inFlight) { + this.inFlight = inFlight + this.$emit('account-creation-in-flight', inFlight) }, createaccount (evt) { evt.preventDefault() // Request is processing - this.inFlight = true + this.setInFlight(true) // Reset errors this.resetErrorState() @@ -186,7 +190,7 @@ export default { // If the error are not empty then dont submit the request if (this.hasError) { - this.inFlight = false + this.setInFlight(false) return } @@ -224,8 +228,11 @@ export default { } this.$store.dispatch('logout') - this.inFlight = false + this.setInFlight(false) }) + }).catch(err => { + console.error(err) + this.setGeneralErrorState() }) }, createSuccessful (success) { @@ -242,7 +249,6 @@ export default { console.log(err) // TODO better error messages.. this.setGeneralErrorState('Post account creation authentication failed!') - this.inFlight = false }) }, checkCurrentLogin () { diff --git a/src/components/Cards/ForgottenPassword.vue b/src/components/Cards/ForgottenPassword.vue index b0241264..a87c3d21 100644 --- a/src/components/Cards/ForgottenPassword.vue +++ b/src/components/Cards/ForgottenPassword.vue @@ -81,6 +81,9 @@ export default { this.$store .dispatch('forgottenPassword', { email }) + .then(() => { + this.inFlight = false + }) }, }, } diff --git a/src/components/Pages/CreateAccount.vue b/src/components/Pages/CreateAccount.vue index e473334d..6bc65d73 100644 --- a/src/components/Pages/CreateAccount.vue +++ b/src/components/Pages/CreateAccount.vue @@ -1,7 +1,7 @@