From fe0ac203f579ac63797bc0bcdf9596826dde9214 Mon Sep 17 00:00:00 2001 From: Raoni Smaneoto Date: Fri, 21 Dec 2018 17:02:43 -0300 Subject: [PATCH 1/2] Adding load-circle in login page --- frontend/auth/login.html | 3 ++- frontend/auth/loginController.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/auth/login.html b/frontend/auth/login.html index 391c6144d..6a69eedd5 100644 --- a/frontend/auth/login.html +++ b/frontend/auth/login.html @@ -22,9 +22,10 @@ class="custom-card-input" required="true" minlength="6" aria-label="Senha">
- + Acessar +
diff --git a/frontend/auth/loginController.js b/frontend/auth/loginController.js index a1d365304..c7101d74a 100644 --- a/frontend/auth/loginController.js +++ b/frontend/auth/loginController.js @@ -28,8 +28,10 @@ }; loginCtrl.loginWithEmailPassword = function loginWithEmailPassword() { + loginCtrl.isLoading = true; AuthService.loginWithEmailAndPassword(loginCtrl.user.email, loginCtrl.user.password).then( function success() { + loginCtrl.isLoading = false; redirectTo(redirectPath); } ).catch(function(error) { From ce454cc334130d3d1c913058ef2a62c0358b3f6e Mon Sep 17 00:00:00 2001 From: JuliePessoa Date: Mon, 7 Jan 2019 15:22:41 -0300 Subject: [PATCH 2/2] Addind loading bar for both login options --- frontend/auth/authService.js | 3 +++ frontend/auth/login.html | 6 +++--- frontend/auth/loginController.js | 8 ++++++++ frontend/test/specs/auth/loginControllerSpec.js | 12 ++++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/frontend/auth/authService.js b/frontend/auth/authService.js index ebacb9856..b242af4aa 100644 --- a/frontend/auth/authService.js +++ b/frontend/auth/authService.js @@ -121,6 +121,7 @@ }; function login(loginMethodPromisse) { + service.isLoadingUser = true; return authObj.setPersistence(firebase.auth.Auth.Persistence.LOCAL).then(function() { return loginMethodPromisse.then(function(response) { return response.user; @@ -138,6 +139,8 @@ service.sendEmailVerification(user); throw "Error! Email not verified."; } + }).finally(() => { + service.isLoadingUser = false; }); } diff --git a/frontend/auth/login.html b/frontend/auth/login.html index 6a69eedd5..48970ba8c 100644 --- a/frontend/auth/login.html +++ b/frontend/auth/login.html @@ -21,12 +21,12 @@ -
- +
+ Acessar -
+