From 22f130d94814828a60cc5442ae4ec3de3c8f218a Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 26 Feb 2018 10:41:37 +0100 Subject: [PATCH] Remove lag when displaying loading screen in login and register --- customize.dist/login.js | 6 ++++-- www/login/main.js | 4 ---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/customize.dist/login.js b/customize.dist/login.js index 5511637e8..fde218d21 100644 --- a/customize.dist/login.js +++ b/customize.dist/login.js @@ -191,8 +191,10 @@ define([ window.location.href = '/drive/'; }; + var hashing; Exports.loginOrRegisterUI = function (uname, passwd, isRegister, shouldImport, testing, test) { - var hashing = true; + if (hashing) { return void console.log("hashing is already in progress"); } + hashing = true; var proceed = function (result) { hashing = false; @@ -275,7 +277,7 @@ define([ proceed(result); }); - }, 0); + }, 500); }, 200); }; diff --git a/www/login/main.js b/www/login/main.js index f0c6c7d22..b3f08a0cf 100644 --- a/www/login/main.js +++ b/www/login/main.js @@ -53,12 +53,8 @@ define([ $('button.login').click(); }); - var hashing = false; var test; $('button.login').click(function () { - if (hashing) { return void console.log("hashing is already in progress"); } - - hashing = true; var shouldImport = $checkImport[0].checked; var uname = $uname.val(); var passwd = $passwd.val();