1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

Adding mask and toggle for Card Security Code (#5)

* Adding mask and toggle for Card Security Code

* For Card Code Mask - show same number of characters as code
This commit is contained in:
Neil Burrows
2018-06-13 17:33:26 +01:00
committed by Kyle Spearrin
parent cfad521ea8
commit 1ab6ce6ec0
2 changed files with 10 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ export class ViewComponent implements OnDestroy {
cipher: CipherView;
showPassword: boolean;
showCardCode: boolean;
isPremium: boolean;
totpCode: string;
totpCodeFormatted: string;
@@ -80,6 +81,11 @@ export class ViewComponent implements OnDestroy {
this.showPassword = !this.showPassword;
}
toggleCardCode() {
this.analytics.eventTrack.next({ action: 'Toggled Card Code' });
this.showCardCode = !this.showCardCode;
}
async checkPassword() {
if (this.cipher.login == null || this.cipher.login.password == null || this.cipher.login.password === '') {
return;