From 60d00f4a5b379190df7d8b3d9cfea8ff5d9b3dc0 Mon Sep 17 00:00:00 2001 From: Chneemann Date: Mon, 20 May 2024 09:38:43 +0200 Subject: [PATCH] added login dialog to google login --- src/app/components/login/login.component.ts | 1 + src/app/services/login.service.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/app/components/login/login.component.ts b/src/app/components/login/login.component.ts index e494cb3..0968ce9 100644 --- a/src/app/components/login/login.component.ts +++ b/src/app/components/login/login.component.ts @@ -57,6 +57,7 @@ export class LoginComponent { } googleLogin() { + this.sharedService.isBtnDisabled = true; this.loginSerivce.googleLogin(); } diff --git a/src/app/services/login.service.ts b/src/app/services/login.service.ts index 7befeea..87c961f 100644 --- a/src/app/services/login.service.ts +++ b/src/app/services/login.service.ts @@ -127,13 +127,16 @@ export class LoginService { color: this.sharedService.generateRandomColor(), lastLogin: 0, }); + this.sharedService.isBtnDisabled = false; } else { this.ifExistUser(user.uid); + this.sharedService.isBtnDisabled = false; } }); }) .catch((error) => { console.error('Google login error:', error); + this.sharedService.isBtnDisabled = false; }); }