1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

toggle password visibility on login/register

This commit is contained in:
Kyle Spearrin
2018-02-24 13:45:41 -05:00
parent ccfc7b3eb1
commit 40e135a297
6 changed files with 61 additions and 13 deletions

View File

@@ -29,6 +29,7 @@ export class LoginComponent {
email: string = '';
masterPassword: string = '';
showPassword: boolean = false;
formPromise: Promise<AuthResult>;
constructor(private authService: AuthService, private router: Router, private analytics: Angulartics2,
@@ -76,4 +77,10 @@ export class LoginComponent {
modal.close();
});
}
togglePassword() {
this.analytics.eventTrack.next({ action: 'Toggled Master Password on Login' });
this.showPassword = !this.showPassword;
document.getElementById('masterPassword').focus();
}
}