Merge branch 'main' into feat-dice
All checks were successful
CI / Get Changed Files (pull_request) Successful in 13s
CI / eslint (pull_request) Has been skipped
CI / Docker frontend validation (pull_request) Has been skipped
CI / oxlint (pull_request) Has been skipped
CI / prettier (pull_request) Has been skipped
CI / test-build (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Successful in 13s
CI / Checkstyle Main (pull_request) Successful in 2m39s
All checks were successful
CI / Get Changed Files (pull_request) Successful in 13s
CI / eslint (pull_request) Has been skipped
CI / Docker frontend validation (pull_request) Has been skipped
CI / oxlint (pull_request) Has been skipped
CI / prettier (pull_request) Has been skipped
CI / test-build (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Successful in 13s
CI / Checkstyle Main (pull_request) Successful in 2m39s
This commit is contained in:
commit
0d59b63c23
3 changed files with 27 additions and 5 deletions
|
@ -16,13 +16,13 @@ export class VerifyEmailComponent implements OnInit {
|
|||
const token = this.route.snapshot.queryParamMap.get('token');
|
||||
|
||||
if (!token) {
|
||||
this.router.navigate(['']);
|
||||
this.router.navigate(['/']);
|
||||
console.log('no token');
|
||||
return;
|
||||
}
|
||||
|
||||
this.authService.verifyEmail(token).subscribe(() => {
|
||||
this.router.navigate([''], {
|
||||
this.router.navigate(['/'], {
|
||||
queryParams: { login: true },
|
||||
});
|
||||
});
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@if (showLogin() || showRegister()) {
|
||||
@if (showLogin() || showRegister() || showRecoverPassword()) {
|
||||
<div
|
||||
class="fixed inset-0 bg-black/50 z-40"
|
||||
(click)="hideAuthForms()"
|
||||
|
@ -194,7 +194,11 @@
|
|||
<div class="fixed inset-0 flex items-center justify-center z-50 p-4" role="presentation">
|
||||
<div class="relative" role="dialog" aria-modal="true">
|
||||
@if (showLogin()) {
|
||||
<app-login (switchForm)="showRegisterForm()" (closeDialog)="hideAuthForms()"></app-login>
|
||||
<app-login
|
||||
(forgotPassword)="showRecoverPasswordForm()"
|
||||
(switchForm)="showRegisterForm()"
|
||||
(closeDialog)="hideAuthForms()"
|
||||
></app-login>
|
||||
}
|
||||
@if (showRegister()) {
|
||||
<app-register
|
||||
|
@ -202,6 +206,12 @@
|
|||
(closeDialog)="hideAuthForms()"
|
||||
></app-register>
|
||||
}
|
||||
@if (showRecoverPassword()) {
|
||||
<app-recover-password
|
||||
(closeDialog)="hideAuthForms()"
|
||||
(switchToLogin)="showLoginForm()"
|
||||
></app-recover-password>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue