From b0d95991f1eae1230bb4dd4a5f734243e7696dcf Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Mon, 2 Dec 2019 14:39:15 -0500 Subject: [PATCH] [+] Disable input when logging in with token --- src/components/login/login.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/login/login.ts b/src/components/login/login.ts index 95a8a39..31610f0 100644 --- a/src/components/login/login.ts +++ b/src/components/login/login.ts @@ -36,6 +36,9 @@ export default class Login extends Vue } else { + // Show loading + this.disableInput = this.loading = true; + // Login with token TODO: Logout if expired this.login('/login/token', {token: this.$cookies.get('va.token')}); } @@ -99,14 +102,14 @@ export default class Login extends Vue { // Show error message & allow user to retry this.error = response.data; - this.loading = false; + this.disableInput = this.loading = false; } }) .catch(err => { // Show error message & allow user to retry this.error = err; - this.loading = false; + this.disableInput = this.loading = false; }); }