1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-25 16:59:17 +01:00

Mask Card Code on Angular Web Vault (#6)

* Adding mask and toggle for Card Security Code

* For Card Code Mask - show same number of characters as code

* Mask Card Code in angular web vault
This commit is contained in:
Neil Burrows 2018-06-16 13:39:51 +01:00 committed by Kyle Spearrin
parent c3ad9b9b7d
commit 8fcbc887a2

View File

@ -46,6 +46,7 @@ export class AddEditComponent {
deletePromise: Promise<any>;
checkPasswordPromise: Promise<number>;
showPassword: boolean = false;
showCardCode: boolean = false;
cipherType = CipherType;
fieldType = FieldType;
addFieldType: FieldType = FieldType.Text;
@ -262,6 +263,12 @@ export class AddEditComponent {
document.getElementById('loginPassword').focus();
}
toggleCardCode() {
this.analytics.eventTrack.next({ action: 'Toggled CardCode on Edit' });
this.showCardCode = !this.showCardCode;
document.getElementById('cardCode').focus();
}
toggleFieldValue(field: FieldView) {
const f = (field as any);
f.showValue = !f.showValue;