-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d826d2a
commit 7900b3c
Showing
11 changed files
with
348 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
148 changes: 88 additions & 60 deletions
148
src/UI/src/app/modules/auth/pages/login/login.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,95 @@ | ||
<!-- login form --> | ||
<form class="my-10 space-y-6" [formGroup]="form" (ngSubmit)="onSubmit()"> | ||
<div class="text-center"> | ||
<h2 class="mb-1 text-3xl font-semibold text-gray-700 dark:text-white"> | ||
Hello Again <span class="text-primary-500">!</span> | ||
</h2> | ||
<p class="text-sm text-gray-400 dark:text-night-200">Enter your credential to access your account.</p> | ||
</div> | ||
|
||
|
||
<div class="space-y-3 text-left"> | ||
<div class="form__group"> | ||
<div class="relative"> | ||
<input | ||
id="email" | ||
[ngClass]="{ 'is__invalid-input': submitted && f['email'].errors }" | ||
class="peer bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded rounded-md focus:ring-primary-500 focus:border-blue-500 block w-full p-2.5 dark:bg-night-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 " | ||
placeholder=" " | ||
formControlName="email" /> | ||
<label | ||
for="email" | ||
class="absolute top-2 left-1 z-10 origin-[0] -translate-y-4 scale-95 transform bg-white px-2 text-sm text-gray-500 duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-95 peer-focus:px-2 peer-focus:text-primary-500 dark:bg-night-700 dark:text-night-200"> | ||
Email address | ||
</label> | ||
</div> | ||
<div *ngIf="submitted && f['email'].errors" class="is__invalid-error"> | ||
<div *ngIf="f['email'].errors['required']">Required field</div> | ||
<div *ngIf="f['email'].errors['email']">Email must be an email address valid</div> | ||
</div> | ||
<form class="my-10 space-y-10" [formGroup]="form" (ngSubmit)="onSubmit()"> | ||
<div class="text-center"> | ||
<h2 class="mb-1 text-3xl font-semibold text-gray-700 dark:text-white"> | ||
Hello Again <span class="text-primary-500">!</span> | ||
</h2> | ||
<p class="text-sm text-gray-500 dark:text-night-200"> | ||
Enter your credential to access your account. | ||
</p> | ||
</div> | ||
|
||
<div class="space-y-3 text-left"> | ||
<div class="form__group"> | ||
<div class="relative"> | ||
<input | ||
id="email" | ||
[ngClass]="{ 'is__invalid-input': submitted && f['email'].errors }" | ||
class="peer bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded rounded-md focus:ring-primary-500 block w-full p-2.5 dark:bg-night-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" | ||
placeholder=" " | ||
formControlName="email" | ||
/> | ||
|
||
<label | ||
for="email" | ||
class="absolute top-2 left-1 z-10 origin-[0] -translate-y-4 scale-95 transform bg-white px-2 text-sm text-gray-500 duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-95 peer-focus:px-2 peer-focus:text-primary-500 dark:bg-night-700 dark:text-night-200" | ||
> | ||
Email address | ||
</label> | ||
</div> | ||
|
||
<div class="form__group"> | ||
<div class="relative"> | ||
|
||
|
||
<input | ||
id="password" | ||
[ngClass]="{ 'is__invalid-input': submitted && f['email'].errors }" | ||
class="peer bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded rounded-md focus:ring-primary-500 focus:border-blue-500 block w-full p-2.5 dark:bg-night-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 " | ||
placeholder=" " | ||
formControlName="password" /> | ||
<label | ||
for="password" | ||
class="absolute top-2 left-1 z-10 origin-[0] -translate-y-4 scale-95 transform bg-white px-2 text-sm text-gray-500 duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-95 peer-focus:px-2 peer-focus:text-primary-500 dark:bg-night-700 dark:text-night-200"> | ||
Password | ||
</label> | ||
</div> | ||
|
||
<div *ngIf="submitted && f['password'].errors" class="is__invalid-error"> | ||
<div *ngIf="f['password'].errors['required']">Required field</div> | ||
<div *ngIf="submitted && f['email'].errors" class="is__invalid-error"> | ||
<div *ngIf="f['email'].errors['required']">Required field</div> | ||
<div *ngIf="f['email'].errors['email']"> | ||
Email must be an email address valid | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
<!-- Submit Button --> | ||
<button | ||
class="group relative mb-10 flex w-full justify-center rounded-md border border-transparent bg-primary-500 py-2 px-4 text-sm font-medium text-white focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 hover:bg-primary-400"> | ||
Sign in | ||
</button> | ||
|
||
<!-- Sign-up --> | ||
<div class="text-sm text-gray-400 dark:text-night-200"> | ||
Not a Member yet? <a routerLink="/auth/register" class="text-primary-500 hover:text-primary-400">Register</a> | ||
|
||
<div class=""> | ||
<div class="relative"> | ||
<input | ||
[type]="passwordTextType ? 'text' : 'password'" | ||
id="password" | ||
style="border-radius: 0.375rem" | ||
[ngClass]="{ 'is__invalid-input': submitted && f['email'].errors }" | ||
class="peer bg-gray-50 text-gray-900 text-sm rounded rounded-md focus:ring-primary-500 block w-full p-2.5 dark:bg-night-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" | ||
placeholder=" " | ||
formControlName="password" | ||
/> | ||
<label | ||
for="password" | ||
class="absolute top-2 left-1 z-10 origin-[0] -translate-y-4 scale-95 transform bg-white px-2 text-sm text-gray-500 duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-95 peer-focus:px-2 peer-focus:text-primary-600 dark:bg-night-700 dark:text-night-200" | ||
> | ||
Password | ||
</label> | ||
<span | ||
class="absolute top-2 right-5 cursor-pointer text-gray-400 dark:text-night-300" | ||
> | ||
<ng-icon | ||
(click)="togglePasswordTextType()" | ||
*ngIf="!passwordTextType" | ||
name="heroEye" | ||
class="text-3xl text-gray-400 dark:text-gray-600" | ||
></ng-icon> | ||
<ng-icon | ||
(click)="togglePasswordTextType()" | ||
*ngIf="passwordTextType" | ||
name="heroEyeSlash" | ||
class="text-3xl text-gray-400 dark:text-gray-600" | ||
></ng-icon> | ||
</span> | ||
</div> | ||
<div *ngIf="submitted && f['password'].errors" class="is__invalid-error"> | ||
<div *ngIf="f['password'].errors['required']">Required field</div> | ||
</div> | ||
</div> | ||
</form> | ||
|
||
</div> | ||
|
||
<!-- Submit Button --> | ||
<button | ||
class="scale-100 animate-fade-in-up opacity-100 duration-200 group relative mb-10 flex w-full justify-center rounded-md border border-transparent bg-primary-500 py-2 px-4 text-sm font-medium text-white focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 hover:bg-primary-400" | ||
> | ||
Sign in | ||
</button> | ||
|
||
<!-- Sign-up --> | ||
<div class="text-sm text-gray-500 dark:text-night-200"> | ||
Not a Member yet? | ||
<a | ||
routerLink="/auth/register" | ||
class="text-primary-500 hover:text-primary-400 font-bold" | ||
>Register</a | ||
> | ||
</div> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.is__invalid-input { | ||
border-color: #e11d48; | ||
} | ||
|
||
.is__invalid-error { | ||
color: #e11d48; | ||
@apply px-1 pt-1 text-xs; | ||
} | ||
|
||
.input-psw{ | ||
border-color: #d1d5db; | ||
background: #f9fafb ; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.