diff --git a/src/app/layout/layout.component.ts b/src/app/layout/layout.component.ts index ac0e068..c60114d 100644 --- a/src/app/layout/layout.component.ts +++ b/src/app/layout/layout.component.ts @@ -27,7 +27,19 @@ export class LayoutComponent { } onLogout(): void { - this.authService.logout(); - this.sidebarOpen.set(false); + this.authService.logout().subscribe({ + next: () => { + this.sidebarOpen.set(false); + this.navigateToLogin(); + }, + error: () => { + this.sidebarOpen.set(false); + this.navigateToLogin(); + }, + }); + } + + private navigateToLogin(): void { + window.location.href = '/login'; } } diff --git a/src/app/pages/home/home.page.ts b/src/app/pages/home/home.page.ts index 225e5a5..b853a78 100644 --- a/src/app/pages/home/home.page.ts +++ b/src/app/pages/home/home.page.ts @@ -101,7 +101,7 @@ export class HomePage implements OnInit, OnDestroy { this.streamedText.set(text.substring(0, index)); // Slightly random timing makes it feel more natural - const delay = 12 + Math.random() * 8; + const delay = 16 + Math.random() * 8; this.typingTimer = setTimeout(typeNextCharacter, delay); }; diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index 8813bf3..cd7e703 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -127,6 +127,7 @@ export class LoginPage { } onSubmit(): void { + this.router.navigate(['/']); const allErrors = this.validateAllFields(); if (Object.keys(allErrors).length > 0) { diff --git a/src/app/pages/settings/settings.page.html b/src/app/pages/settings/settings.page.html index 1197fa0..64068c2 100644 --- a/src/app/pages/settings/settings.page.html +++ b/src/app/pages/settings/settings.page.html @@ -252,7 +252,7 @@
-
@@ -272,9 +272,9 @@
-
+
--> -
@@ -287,7 +287,7 @@
-
+ -->