1- < div class ="login-container ">
2- < mat-card class ="login-card ">
3- < mat-card-header >
4- < mat-card-title > Mini KMS Login</ mat-card-title >
5- < mat-card-subtitle > Sign in to your account</ mat-card-subtitle >
6- </ mat-card-header >
7-
8- < mat-card-content >
9- < form [formGroup] ="loginForm " (ngSubmit) ="onSubmit() " class ="login-form ">
10- < mat-form-field appearance ="outline " class ="full-width ">
11- < mat-label > Username</ mat-label >
12- < input matInput
13- formControlName ="username "
14- autocomplete ="username ">
15- < mat-icon matSuffix > person</ mat-icon >
16- < mat-error *ngIf ="loginForm.get('username')?.invalid && loginForm.get('username')?.touched ">
17- {{ getErrorMessage('username') }}
18- </ mat-error >
19- </ mat-form-field >
20-
21- < mat-form-field appearance ="outline " class ="full-width ">
22- < mat-label > Password</ mat-label >
23- < input matInput
24- [type] ="hidePassword ? 'password' : 'text' "
25- formControlName ="password "
26- autocomplete ="current-password ">
27- < button mat-icon-button
28- matSuffix
29- (click) ="hidePassword = !hidePassword "
30- type ="button "
31- [disabled] ="loading ">
32- < mat-icon > {{ hidePassword ? 'visibility_off' : 'visibility' }}</ mat-icon >
33- </ button >
34- < mat-error *ngIf ="loginForm.get('password')?.invalid && loginForm.get('password')?.touched ">
35- {{ getErrorMessage('password') }}
36- </ mat-error >
37- </ mat-form-field >
38-
39- < button mat-raised-button
40- color ="primary "
41- type ="submit "
42- class ="full-width login-button "
43- [disabled] ="loginForm.invalid || loading ">
44- < div class ="button-content ">
1+ < body >
2+ < div class ="login-container ">
3+ < div class ="login-card ">
4+ < div class ="login-header ">
5+ < h1 > Mini KMS</ h1 >
6+ < p > Sign in to your account</ p >
7+ </ div >
8+
9+ < form [formGroup] ="loginForm " (ngSubmit) ="onSubmit() " class ="login-form ">
10+ < div class ="input-group ">
11+ < label class ="input-label " for ="username "> Username</ label >
12+ < div class ="input-wrapper ">
13+ < mat-icon class ="input-icon "> person</ mat-icon >
14+ < input
15+ id ="username "
16+ name ="username "
17+ class ="custom-input "
18+ formControlName ="username "
19+ autocomplete ="username "
20+ placeholder ="Enter your username ">
21+ </ div >
22+ < div class ="error-message " *ngIf ="loginForm.get('username')?.invalid && loginForm.get('username')?.touched ">
23+ {{ getErrorMessage('username') }}
24+ </ div >
25+ </ div >
26+
27+ < div class ="input-group ">
28+ < label class ="input-label " for ="password "> Password</ label >
29+ < div class ="input-wrapper ">
30+ < mat-icon class ="input-icon "> lock</ mat-icon >
31+ < input
32+ id ="password "
33+ name ="password "
34+ class ="custom-input "
35+ [type] ="hidePassword ? 'password' : 'text' "
36+ formControlName ="password "
37+ autocomplete ="current-password "
38+ placeholder ="Enter your password ">
39+ < button
40+ type ="button "
41+ class ="visibility-toggle "
42+ (click) ="hidePassword = !hidePassword "
43+ [disabled] ="loading ">
44+ < mat-icon > {{ hidePassword ? 'visibility_off' : 'visibility' }}</ mat-icon >
45+ </ button >
46+ </ div >
47+ < div class ="error-message " *ngIf ="loginForm.get('password')?.invalid && loginForm.get('password')?.touched ">
48+ {{ getErrorMessage('password') }}
49+ </ div >
50+ </ div >
51+
52+ < button
53+ type ="submit "
54+ class ="login-button "
55+ [disabled] ="loginForm.invalid || loading "
56+ [class.loading] ="loading ">
4557 < mat-spinner *ngIf ="loading " diameter ="20 "> </ mat-spinner >
4658 < span > {{ loading ? 'Signing in...' : 'Sign In' }}</ span >
47- </ div >
48- </ button >
49- </ form >
50- </ mat-card-content >
51- </ mat-card >
52- </ div >
59+ </ button >
60+ </ form >
61+ </ div >
62+ </ div >
63+ </ body >
0 commit comments