[O] Unify show loading
This commit is contained in:
@@ -35,9 +35,6 @@ export default class Login extends Vue
|
|||||||
if (this.needToUpdateCookies()) this.clearCookies();
|
if (this.needToUpdateCookies()) this.clearCookies();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Show loading
|
|
||||||
this.disableInput = this.loading = true;
|
|
||||||
|
|
||||||
// Login with token
|
// Login with token
|
||||||
this.login('/login/token', {token: this.$cookies.get('va.token')});
|
this.login('/login/token', {token: this.$cookies.get('va.token')});
|
||||||
}
|
}
|
||||||
@@ -64,8 +61,6 @@ export default class Login extends Vue
|
|||||||
*/
|
*/
|
||||||
loginClick()
|
loginClick()
|
||||||
{
|
{
|
||||||
// Make login button loading
|
|
||||||
this.loading = true;
|
|
||||||
|
|
||||||
// Format it
|
// Format it
|
||||||
this.username = this.username.toLowerCase().replace(/ /g, '').replace(/@.*/g, '');
|
this.username = this.username.toLowerCase().replace(/ /g, '').replace(/@.*/g, '');
|
||||||
@@ -79,6 +74,9 @@ export default class Login extends Vue
|
|||||||
*/
|
*/
|
||||||
login(url: string, data: any)
|
login(url: string, data: any)
|
||||||
{
|
{
|
||||||
|
// Show loading
|
||||||
|
this.disableInput = this.loading = true;
|
||||||
|
|
||||||
// Fetch request
|
// Fetch request
|
||||||
App.http.post(url, data).then(response =>
|
App.http.post(url, data).then(response =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user