[+] Disable input when logging in with token
This commit is contained in:
@@ -36,6 +36,9 @@ export default class Login extends Vue
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Show loading
|
||||||
|
this.disableInput = this.loading = true;
|
||||||
|
|
||||||
// Login with token TODO: Logout if expired
|
// Login with token TODO: Logout if expired
|
||||||
this.login('/login/token', {token: this.$cookies.get('va.token')});
|
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
|
// Show error message & allow user to retry
|
||||||
this.error = response.data;
|
this.error = response.data;
|
||||||
this.loading = false;
|
this.disableInput = this.loading = false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err =>
|
.catch(err =>
|
||||||
{
|
{
|
||||||
// Show error message & allow user to retry
|
// Show error message & allow user to retry
|
||||||
this.error = err;
|
this.error = err;
|
||||||
this.loading = false;
|
this.disableInput = this.loading = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user