mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 09:43:23 +00:00
toggle password visibility on login/register
This commit is contained in:
@@ -22,6 +22,7 @@ export class RegisterComponent {
|
||||
masterPassword: string = '';
|
||||
confirmMasterPassword: string = '';
|
||||
hint: string = '';
|
||||
showPassword: boolean = false;
|
||||
formPromise: Promise<any>;
|
||||
|
||||
constructor(private authService: AuthService, private router: Router, private analytics: Angulartics2,
|
||||
@@ -72,4 +73,10 @@ export class RegisterComponent {
|
||||
const request = new RegisterRequest(this.email, hashedPassword, this.hint, encKey.encryptedString);
|
||||
await this.apiService.postRegister(request);
|
||||
}
|
||||
|
||||
togglePassword(confirmField: boolean) {
|
||||
this.analytics.eventTrack.next({ action: 'Toggled Master Password on Register' });
|
||||
this.showPassword = !this.showPassword;
|
||||
document.getElementById(confirmField ? 'masterPasswordRetype' : 'masterPassword').focus();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user