mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-26 17:08:33 +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:
parent
c3ad9b9b7d
commit
8fcbc887a2
@ -46,6 +46,7 @@ export class AddEditComponent {
|
|||||||
deletePromise: Promise<any>;
|
deletePromise: Promise<any>;
|
||||||
checkPasswordPromise: Promise<number>;
|
checkPasswordPromise: Promise<number>;
|
||||||
showPassword: boolean = false;
|
showPassword: boolean = false;
|
||||||
|
showCardCode: boolean = false;
|
||||||
cipherType = CipherType;
|
cipherType = CipherType;
|
||||||
fieldType = FieldType;
|
fieldType = FieldType;
|
||||||
addFieldType: FieldType = FieldType.Text;
|
addFieldType: FieldType = FieldType.Text;
|
||||||
@ -262,6 +263,12 @@ export class AddEditComponent {
|
|||||||
document.getElementById('loginPassword').focus();
|
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) {
|
toggleFieldValue(field: FieldView) {
|
||||||
const f = (field as any);
|
const f = (field as any);
|
||||||
f.showValue = !f.showValue;
|
f.showValue = !f.showValue;
|
||||||
|
Loading…
Reference in New Issue
Block a user