toggle card code on add/edit

This commit is contained in:
Kyle Spearrin 2018-06-18 17:25:22 -04:00
parent d839dc6185
commit f14b4b89b9
3 changed files with 17 additions and 7 deletions

2
jslib

@ -1 +1 @@
Subproject commit 4bce071498aeda43e44f9b5f7f60ae11a57c7d6f Subproject commit e5db01083cc13df3696bb30562a83d729280ac03

View File

@ -97,10 +97,20 @@
<input id="cardExpYear" type="text" name="Card.ExpYear" [(ngModel)]="cipher.card.expYear" <input id="cardExpYear" type="text" name="Card.ExpYear" [(ngModel)]="cipher.card.expYear"
placeholder="{{'ex' | i18n}} 2019"> placeholder="{{'ex' | i18n}} 2019">
</div> </div>
<div class="box-content-row" appBoxRow> <div class="box-content-row box-content-row-flex" appBoxRow>
<label for="cardCode">{{'securityCode' | i18n}}</label> <div class="row-main">
<input id="cardCode" type="text" name="Card.Code" [(ngModel)]="cipher.card.code" <label for="cardCode">{{'securityCode' | i18n}}</label>
appInputVerbatim> <input id="cardCode" class="monospaced"
type="{{showCardCode ? 'text' : 'password'}}" name="Card.Code"
[(ngModel)]="cipher.card.code" appInputVerbatim>
</div>
<div class="action-buttons">
<a class="row-btn" href="#" appStopClick appBlurClick
title="{{'toggleVisibility' | i18n}}" (click)="toggleCardCode()">
<i class="fa fa-lg"
[ngClass]="{'fa-eye': !showCardCode, 'fa-eye-slash': showCardCode}"></i>
</a>
</div>
</div> </div>
</div> </div>
<!-- Identity --> <!-- Identity -->

View File

@ -111,8 +111,8 @@
<div class="box-content-row box-content-row-flex" *ngIf="cipher.card.code"> <div class="box-content-row box-content-row-flex" *ngIf="cipher.card.code">
<div class="row-main"> <div class="row-main">
<span class="row-label">{{'securityCode' | i18n}}</span> <span class="row-label">{{'securityCode' | i18n}}</span>
<span [hidden]="showCardCode" >{{cipher.card.maskedCode}}</span> <span [hidden]="showCardCode" class="monospaced">{{cipher.card.maskedCode}}</span>
<span [hidden]="!showCardCode" >{{cipher.card.code}}</span> <span [hidden]="!showCardCode" class="monospaced">{{cipher.card.code}}</span>
</div> </div>
<div class="action-buttons"> <div class="action-buttons">
<a class="row-btn" href="#" appStopClick title="{{'toggleVisibility' | i18n}}" <a class="row-btn" href="#" appStopClick title="{{'toggleVisibility' | i18n}}"