1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

cipher type icons

This commit is contained in:
Kyle Spearrin 2017-10-09 10:42:26 -04:00
parent 88c302ca2e
commit fe9e29a057
5 changed files with 32 additions and 6 deletions

View File

@ -86,7 +86,8 @@ angular
favorite: encryptedCipher.Favorite,
edit: encryptedCipher.Edit,
organizationUseTotp: encryptedCipher.OrganizationUseTotp,
attachments: null
attachments: null,
icon: null
};
var cipherData = encryptedCipher.Data;
@ -103,10 +104,12 @@ angular
dataObj.password = _service.decryptProperty(cipherData.Password, key, true, false);
dataObj.totp = _service.decryptProperty(cipherData.Totp, key, true, false);
cipher.login = dataObj;
cipher.icon = 'fa-globe';
break;
case constants.cipherType.secureNote:
dataObj.type = cipherData.Type;
cipher.secureNote = dataObj;
cipher.icon = 'fa-sticky-note-o';
break;
case constants.cipherType.card:
dataObj.cardholderName = _service.decryptProperty(cipherData.CardholderName, key, true, false);
@ -116,6 +119,7 @@ angular
dataObj.expYear = _service.decryptProperty(cipherData.ExpYear, key, true, false);
dataObj.code = _service.decryptProperty(cipherData.Code, key, true, false);
cipher.card = dataObj;
cipher.icon = 'fa-credit-card';
break;
case constants.cipherType.identity:
dataObj.title = _service.decryptProperty(cipherData.Title, key, true, false);
@ -135,6 +139,7 @@ angular
dataObj.ssn = _service.decryptProperty(cipherData.SSN, key, true, false);
dataObj.username = _service.decryptProperty(cipherData.Username, key, true, false);
cipher.identity = dataObj;
cipher.icon = 'fa-id-card-o';
break;
default:
break;
@ -200,7 +205,8 @@ angular
edit: encryptedCipher.Edit,
organizationUseTotp: encryptedCipher.OrganizationUseTotp,
hasAttachments: !!encryptedCipher.Attachments && encryptedCipher.Attachments.length > 0,
meta: {}
meta: {},
icon: null
};
var cipherData = encryptedCipher.Data;
@ -212,9 +218,11 @@ angular
case constants.cipherType.login:
cipher.subTitle = _service.decryptProperty(cipherData.Username, key, true, true);
cipher.meta.password = _service.decryptProperty(cipherData.Password, key, true, true);
cipher.icon = 'fa-globe';
break;
case constants.cipherType.secureNote:
cipher.subTitle = null;
cipher.icon = 'fa-sticky-note-o';
break;
case constants.cipherType.card:
cipher.subTitle = '';
@ -229,6 +237,7 @@ angular
}
cipher.subTitle += ('*' + cipher.meta.number.substr(cipher.meta.number.length - 4));
}
cipher.icon = 'fa-credit-card';
break;
case constants.cipherType.identity:
var firstName = _service.decryptProperty(cipherData.FirstName, key, true, true);
@ -243,6 +252,7 @@ angular
}
cipher.subTitle += lastName;
}
cipher.icon = 'fa-id-card-o';
break;
default:
break;

View File

@ -115,8 +115,11 @@
</ul>
</div>
</td>
<td class="action-select">
<input type="checkbox" value="{{::cipher.id}}" name="cipherSelection" />
<td class="action-select" ng-click="select($event)">
<input type="checkbox" value="{{::cipher.id}}" name="cipherSelection" stop-prop />
</td>
<td class="vault-icon" ng-click="select($event)">
<i class="fa fa-fw fa-lg {{::cipher.icon}}"></i>
</td>
<td ng-click="select($event)">
<a href="#" stop-click ng-click="editCipher(cipher)" stop-prop>{{cipher.name}}</a>
@ -228,6 +231,9 @@
<td class="action-select" ng-click="select($event)">
<input type="checkbox" value="{{::cipher.id}}" name="cipherSelection" stop-prop />
</td>
<td class="vault-icon" ng-click="select($event)">
<i class="fa fa-fw fa-lg {{::cipher.icon}}"></i>
</td>
<td ng-click="select($event)">
<a href="#" stop-click ng-click="editCipher(cipher)" stop-prop>{{cipher.name}}</a>
<i class="fa fa-star text-muted" title="Favorite" ng-show="cipher.favorite" stop-prop></i>

View File

@ -1,6 +1,6 @@
<div class="modal-header">
<button type="button" class="close" ng-click="close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title"><i class="fa fa-globe"></i> Add New Item</h4>
<h4 class="modal-title"><i class="fa fa-plus-circle"></i> Add New Item</h4>
</div>
<form name="form" ng-submit="form.$valid && save()" api-form="savePromise" autocomplete="off">
<div class="modal-body">

View File

@ -1,7 +1,7 @@
<div class="modal-header">
<button type="button" class="close" ng-click="close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">
<i class="fa fa-globe"></i> Item Information <small>{{cipher.name}}</small>
<i class="fa {{cipher.icon}}"></i> Item Information <small>{{cipher.name}}</small>
</h4>
</div>
<form name="form" ng-submit="form.$valid && save(cipher)" api-form="savePromise" autocomplete="off">

View File

@ -437,6 +437,16 @@ form .btn .loading-icon {
display: none;
}
}
.table td.vault-icon {
text-align: center;
width: 41px;
color: @text-muted;
@media (max-width: @screen-sm-max) {
display: none;
}
}
/* Callouts */
.callout.callout-default {
background-color: #fff;