diff --git a/frontend/src/app/app.component.html b/frontend/src/app/app.component.html index 3adc99f..e07b16d 100644 --- a/frontend/src/app/app.component.html +++ b/frontend/src/app/app.component.html @@ -5,8 +5,8 @@ - Auth Forms Overlay --> - @if (showLogin() || showRegister()) { + + @if (showLogin() || showRegister() || showRecoverPassword()) { } diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index 52c1fc3..a889011 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -4,16 +4,25 @@ import { NavbarComponent } from './shared/components/navbar/navbar.component'; import { FooterComponent } from './shared/components/footer/footer.component'; import { LoginComponent } from './feature/auth/login/login.component'; import { RegisterComponent } from './feature/auth/register/register.component'; +import { RecoverPasswordComponent } from './feature/auth/recover-password/recover-password.component'; @Component({ selector: 'app-root', standalone: true, - imports: [RouterOutlet, NavbarComponent, FooterComponent, LoginComponent, RegisterComponent], + imports: [ + RouterOutlet, + NavbarComponent, + FooterComponent, + LoginComponent, + RegisterComponent, + RecoverPasswordComponent, + ], templateUrl: './app.component.html', }) export class AppComponent { showLogin = signal(false); showRegister = signal(false); + showRecoverPassword = signal(false); @HostListener('document:keydown.escape') handleEscapeKey() { @@ -23,18 +32,28 @@ export class AppComponent { 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'; } diff --git a/frontend/src/app/feature/auth/login/login.component.ts b/frontend/src/app/feature/auth/login/login.component.ts index 946f412..dc8a307 100644 --- a/frontend/src/app/feature/auth/login/login.component.ts +++ b/frontend/src/app/feature/auth/login/login.component.ts @@ -17,6 +17,7 @@ export class LoginComponent { isLoading = signal(false); @Output() switchForm = new EventEmitter(); @Output() closeDialog = new EventEmitter(); + @Output() forgotPassword = new EventEmitter(); constructor( private fb: FormBuilder, @@ -65,7 +66,6 @@ export class LoginComponent { } switchToForgotPassword() { - this.closeDialog.emit(); - this.router.navigate(['/recover-password']); + this.forgotPassword.emit(); } } diff --git a/frontend/src/app/feature/auth/recover-password/recover-password.component.html b/frontend/src/app/feature/auth/recover-password/recover-password.component.html index 8dccc09..d89ce27 100644 --- a/frontend/src/app/feature/auth/recover-password/recover-password.component.html +++ b/frontend/src/app/feature/auth/recover-password/recover-password.component.html @@ -1,172 +1,170 @@ -
-