Browse Source
Login Form password visibility (#4140)
* Login Form password visibility
pull/4257/head
vincent12dev
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
2 deletions
-
ui-ngx/src/app/modules/login/pages/login/login.component.html
-
ui-ngx/src/app/modules/login/pages/login/login.component.ts
|
|
|
@ -51,7 +51,12 @@ |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field> |
|
|
|
<mat-label translate>common.password</mat-label> |
|
|
|
<input id="password-input" matInput type="password" formControlName="password"/> |
|
|
|
<input id="password-input" matInput [type]="hidePassword ? 'password' : 'text'" formControlName="password"/> |
|
|
|
<button mat-icon-button matSuffix type="button" |
|
|
|
(click)="hidePassword = !hidePassword" |
|
|
|
[attr.aria-pressed]="hidePassword"> |
|
|
|
<mat-icon>{{hidePassword ? 'visibility_off' : 'visibility'}}</mat-icon> |
|
|
|
</button> |
|
|
|
<mat-icon matPrefix>lock</mat-icon> |
|
|
|
</mat-form-field> |
|
|
|
<div fxLayoutAlign="end center" class="forgot-password"> |
|
|
|
|
|
|
|
@ -37,7 +37,8 @@ export class LoginComponent extends PageComponent implements OnInit { |
|
|
|
password: '' |
|
|
|
}); |
|
|
|
oauth2Clients: Array<OAuth2ClientInfo> = null; |
|
|
|
|
|
|
|
hidePassword = true; |
|
|
|
|
|
|
|
constructor(protected store: Store<AppState>, |
|
|
|
private authService: AuthService, |
|
|
|
public fb: FormBuilder, |
|
|
|
|