1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-24 11:55:50 +01:00

toggle card code on add/edit

This commit is contained in:
Kyle Spearrin 2018-06-18 17:29:45 -04:00
parent fda7022279
commit cd48afd415
3 changed files with 17 additions and 6 deletions

2
jslib

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

View File

@ -82,9 +82,20 @@
<input id="cardExpYear" type="text" name="Card.ExpYear" [(ngModel)]="cipher.card.expYear"
placeholder="{{'ex' | i18n}} 2019">
</div>
<div class="box-content-row" appBoxRow>
<label for="cardCode">{{'securityCode' | i18n}}</label>
<input id="cardCode" type="text" name="Card.Code" [(ngModel)]="cipher.card.code">
<div class="box-content-row box-content-row-flex" appBoxRow>
<div class="row-main">
<label for="cardCode">{{'securityCode' | i18n}}</label>
<input id="cardCode" class="monospaced"
type="{{showCardCode ? 'text' : 'password'}}" name="Card.Code"
[(ngModel)]="cipher.card.code">
</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>
<!-- Identity -->

View File

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