Compare commits
No commits in common. "5c64b86bc4da846292fc4345bb4cec1eeaa9882a" and "46c9d2b7c1f0b3a43af6ea57dd06dd77ea2456f7" have entirely different histories.
5c64b86bc4
...
46c9d2b7c1
2 changed files with 3 additions and 25 deletions
|
@ -182,7 +182,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (showLogin() || showRegister() || showRecoverPassword()) {
|
@if (showLogin() || showRegister()) {
|
||||||
<div
|
<div
|
||||||
class="fixed inset-0 bg-black/50 z-40"
|
class="fixed inset-0 bg-black/50 z-40"
|
||||||
(click)="hideAuthForms()"
|
(click)="hideAuthForms()"
|
||||||
|
@ -194,11 +194,7 @@
|
||||||
<div class="fixed inset-0 flex items-center justify-center z-50 p-4" role="presentation">
|
<div class="fixed inset-0 flex items-center justify-center z-50 p-4" role="presentation">
|
||||||
<div class="relative" role="dialog" aria-modal="true">
|
<div class="relative" role="dialog" aria-modal="true">
|
||||||
@if (showLogin()) {
|
@if (showLogin()) {
|
||||||
<app-login
|
<app-login (switchForm)="showRegisterForm()" (closeDialog)="hideAuthForms()"></app-login>
|
||||||
(forgotPassword)="showRecoverPasswordForm()"
|
|
||||||
(switchForm)="showRegisterForm()"
|
|
||||||
(closeDialog)="hideAuthForms()"
|
|
||||||
></app-login>
|
|
||||||
}
|
}
|
||||||
@if (showRegister()) {
|
@if (showRegister()) {
|
||||||
<app-register
|
<app-register
|
||||||
|
@ -206,12 +202,6 @@
|
||||||
(closeDialog)="hideAuthForms()"
|
(closeDialog)="hideAuthForms()"
|
||||||
></app-register>
|
></app-register>
|
||||||
}
|
}
|
||||||
@if (showRecoverPassword()) {
|
|
||||||
<app-recover-password
|
|
||||||
(closeDialog)="hideAuthForms()"
|
|
||||||
(switchToLogin)="showLoginForm()"
|
|
||||||
></app-recover-password>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,12 +11,11 @@ import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||||
import { AuthService } from '@service/auth.service';
|
import { AuthService } from '@service/auth.service';
|
||||||
import { LoginComponent } from '../auth/login/login.component';
|
import { LoginComponent } from '../auth/login/login.component';
|
||||||
import { RegisterComponent } from '../auth/register/register.component';
|
import { RegisterComponent } from '../auth/register/register.component';
|
||||||
import { RecoverPasswordComponent } from '../auth/recover-password/recover-password.component';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-landing-page',
|
selector: 'app-landing-page',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [NgFor, RouterLink, LoginComponent, RegisterComponent, RecoverPasswordComponent],
|
imports: [NgFor, RouterLink, LoginComponent, RegisterComponent],
|
||||||
templateUrl: './landing.component.html',
|
templateUrl: './landing.component.html',
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
|
@ -27,7 +26,6 @@ export class LandingComponent implements OnInit, OnDestroy {
|
||||||
route: ActivatedRoute = inject(ActivatedRoute);
|
route: ActivatedRoute = inject(ActivatedRoute);
|
||||||
showLogin = signal(false);
|
showLogin = signal(false);
|
||||||
showRegister = signal(false);
|
showRegister = signal(false);
|
||||||
showRecoverPassword = signal(false);
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.startAutoplay();
|
this.startAutoplay();
|
||||||
|
@ -45,28 +43,18 @@ export class LandingComponent implements OnInit, OnDestroy {
|
||||||
showLoginForm() {
|
showLoginForm() {
|
||||||
this.showLogin.set(true);
|
this.showLogin.set(true);
|
||||||
this.showRegister.set(false);
|
this.showRegister.set(false);
|
||||||
this.showRecoverPassword.set(false);
|
|
||||||
document.body.style.overflow = 'hidden';
|
document.body.style.overflow = 'hidden';
|
||||||
}
|
}
|
||||||
|
|
||||||
showRegisterForm() {
|
showRegisterForm() {
|
||||||
this.showRegister.set(true);
|
this.showRegister.set(true);
|
||||||
this.showLogin.set(false);
|
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';
|
document.body.style.overflow = 'hidden';
|
||||||
}
|
}
|
||||||
|
|
||||||
hideAuthForms() {
|
hideAuthForms() {
|
||||||
this.showLogin.set(false);
|
this.showLogin.set(false);
|
||||||
this.showRegister.set(false);
|
this.showRegister.set(false);
|
||||||
this.showRecoverPassword.set(false);
|
|
||||||
document.body.style.overflow = 'auto';
|
document.body.style.overflow = 'auto';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue