From ee3a57f5b3bcf7372a6d256632542d582605be1f Mon Sep 17 00:00:00 2001 From: Jan K9f Date: Wed, 21 May 2025 08:45:54 +0200 Subject: [PATCH] fix: Fix bug where the password reset form doesnt show up when using center buttons --- .../src/app/feature/landing/landing.component.html | 14 ++++++++++++-- .../src/app/feature/landing/landing.component.ts | 14 +++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/feature/landing/landing.component.html b/frontend/src/app/feature/landing/landing.component.html index 9a6203d..b7c6a4b 100644 --- a/frontend/src/app/feature/landing/landing.component.html +++ b/frontend/src/app/feature/landing/landing.component.html @@ -182,7 +182,7 @@ - @if (showLogin() || showRegister()) { + @if (showLogin() || showRegister() || showRecoverPassword()) { } diff --git a/frontend/src/app/feature/landing/landing.component.ts b/frontend/src/app/feature/landing/landing.component.ts index 5cfe0c5..aa1867e 100644 --- a/frontend/src/app/feature/landing/landing.component.ts +++ b/frontend/src/app/feature/landing/landing.component.ts @@ -11,11 +11,12 @@ import { ActivatedRoute, RouterLink } from '@angular/router'; import { AuthService } from '@service/auth.service'; import { LoginComponent } from '../auth/login/login.component'; import { RegisterComponent } from '../auth/register/register.component'; +import { RecoverPasswordComponent } from '../auth/recover-password/recover-password.component'; @Component({ selector: 'app-landing-page', standalone: true, - imports: [NgFor, RouterLink, LoginComponent, RegisterComponent], + imports: [NgFor, RouterLink, LoginComponent, RegisterComponent, RecoverPasswordComponent], templateUrl: './landing.component.html', changeDetection: ChangeDetectionStrategy.OnPush, }) @@ -26,6 +27,7 @@ export class LandingComponent implements OnInit, OnDestroy { route: ActivatedRoute = inject(ActivatedRoute); showLogin = signal(false); showRegister = signal(false); + showRecoverPassword = signal(false); ngOnInit() { this.startAutoplay(); @@ -43,18 +45,28 @@ export class LandingComponent implements OnInit, OnDestroy { showLoginForm() { this.showLogin.set(true); this.showRegister.set(false); + this.showRecoverPassword.set(false); document.body.style.overflow = 'hidden'; } showRegisterForm() { this.showRegister.set(true); this.showLogin.set(false); + this.showRecoverPassword.set(false); + document.body.style.overflow = 'hidden'; + } + + showRecoverPasswordForm() { + this.showRecoverPassword.set(true); + this.showLogin.set(false); + this.showRegister.set(false); document.body.style.overflow = 'hidden'; } hideAuthForms() { this.showLogin.set(false); this.showRegister.set(false); + this.showRecoverPassword.set(false); document.body.style.overflow = 'auto'; } -- 2.47.2