From 8fcbc887a221fdb1a16446b6ad1effdfab5bc108 Mon Sep 17 00:00:00 2001 From: Neil Burrows Date: Sat, 16 Jun 2018 13:39:51 +0100 Subject: [PATCH] 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 --- src/angular/components/add-edit.component.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/angular/components/add-edit.component.ts b/src/angular/components/add-edit.component.ts index 5c69e331dc..3034c377f2 100644 --- a/src/angular/components/add-edit.component.ts +++ b/src/angular/components/add-edit.component.ts @@ -46,6 +46,7 @@ export class AddEditComponent { deletePromise: Promise; checkPasswordPromise: Promise; 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;