1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 07:13:32 +00:00

more fixes

This commit is contained in:
Kyle Spearrin
2017-10-16 10:20:46 -04:00
parent 176b9a8ed0
commit fd146afb69
3 changed files with 25 additions and 8 deletions

View File

@@ -420,15 +420,33 @@ function buildDomainModel(model, obj, map, alreadyEncrypted, notEncList) {
break;
case self.constantsService.cipherType.secureNote:
model.secureNote = decObj;
model.subTitle = '-';
model.subTitle = null;
break;
case self.constantsService.cipherType.card:
model.card = decObj;
model.subTitle = model.identity.brand;
model.subTitle = model.card.brand;
if (model.card.brand) {
model.subTitle = model.card.brand;
}
if (model.card.number && model.card.number.length >= 4) {
if (model.subTitle !== '') {
model.subTitle += ', ';
}
model.subTitle += ('*' + model.card.number.substr(model.card.number.length - 4));
}
break;
case self.constantsService.cipherType.identity:
model.identity = decObj;
model.subTitle = model.identity.firstName;
model.subTitle = '';
if (model.identity.firstName) {
model.subTitle = model.identity.firstName;
}
if (model.identity.lastName) {
if (model.subTitle !== '') {
model.subTitle += ' ';
}
model.subTitle += model.identity.lastName;
}
break;
default:
break;