added skeletons
This commit is contained in:
parent
8a1ab8b11e
commit
a5f06ef940
|
@ -1,3 +1,4 @@
|
|||
@if (!userSignupSuccess()) {
|
||||
<div class="flex h-screen w-screen">
|
||||
<div
|
||||
[ngStyle]="leftBackgroundStyle"
|
||||
|
@ -72,7 +73,9 @@
|
|||
<div
|
||||
class="animate-fade-down animate-once animate-duration-1000 animate-ease-in-out flex-1 flex flex-col justify-center items-center px-12">
|
||||
<h1 class="text-3xl font-semibold text-center">Create an Account</h1>
|
||||
<p class="text-center">Enter your email below to create your Account</p>
|
||||
<p class="text-center">
|
||||
Enter your email below to create your Account
|
||||
</p>
|
||||
<form
|
||||
[formGroup]="form"
|
||||
(ngSubmit)="onSubmit()"
|
||||
|
@ -109,7 +112,8 @@
|
|||
'w-full': true,
|
||||
'border-error focus:border-error':
|
||||
form.get('password')?.invalid &&
|
||||
(form.get('password')?.dirty || form.get('password')?.touched)
|
||||
(form.get('password')?.dirty ||
|
||||
form.get('password')?.touched)
|
||||
}"
|
||||
class="input input-bordered flex items-center gap-2">
|
||||
<svg
|
||||
|
@ -257,6 +261,11 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
} @else {
|
||||
<div class="flex h-screen w-screen bg-primary">
|
||||
<div class="hidden md:flex md:flex-col md:w-1/1"></div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="modal modal-open" *ngIf="isDialogOpen()">
|
||||
<div
|
||||
|
|
|
@ -82,6 +82,7 @@ export class RegisterRootComponent implements OnInit {
|
|||
public rememberMe: FormControl = new FormControl(false);
|
||||
public isSigninSignal: WritableSignal<boolean> = signal(false);
|
||||
public isSignupSignal: WritableSignal<boolean> = signal(true);
|
||||
public isSignUpSuccess: WritableSignal<boolean> = signal(false);
|
||||
public userSignupSuccess: WritableSignal<boolean> = signal(false);
|
||||
public isDialogOpen: WritableSignal<boolean> = signal(false);
|
||||
public isLoading: WritableSignal<boolean> = signal(false);
|
||||
|
@ -108,16 +109,21 @@ export class RegisterRootComponent implements OnInit {
|
|||
});
|
||||
const rememberMe = this.localStorageService.getItem<boolean>('remember-me');
|
||||
|
||||
if (rememberMe === true) {
|
||||
if (rememberMe) {
|
||||
this.authService
|
||||
.status()
|
||||
.pipe(delay(1500))
|
||||
.subscribe((response: SuccessDtoApiModel) => {
|
||||
.subscribe({
|
||||
next: (response: SuccessDtoApiModel) => {
|
||||
if (response.success) {
|
||||
this.router.navigate(['/dashboard']);
|
||||
} else {
|
||||
this.displaySkeleton.set(false);
|
||||
}
|
||||
},
|
||||
error: () => {
|
||||
this.displaySkeleton.set(false);
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -380,6 +386,7 @@ export class RegisterRootComponent implements OnInit {
|
|||
.subscribe((response: SuccessDtoApiModel) => {
|
||||
if (response.success) {
|
||||
this.openModal();
|
||||
this.userSignupSuccess.set(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue