Browse Source

Login Form password visibility (#4140)

* Login Form password visibility
pull/4257/head
vincent12dev 5 years ago
committed by GitHub
parent
commit
47e82b3cd7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      ui-ngx/src/app/modules/login/pages/login/login.component.html
  2. 3
      ui-ngx/src/app/modules/login/pages/login/login.component.ts

7
ui-ngx/src/app/modules/login/pages/login/login.component.html

@ -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">

3
ui-ngx/src/app/modules/login/pages/login/login.component.ts

@ -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,

Loading…
Cancel
Save