mask password on site view

This commit is contained in:
Kyle Spearrin 2016-09-10 23:50:51 -04:00
parent 8fc611e4a5
commit 8d4d2df8ad
2 changed files with 11 additions and 2 deletions

View File

@ -6,6 +6,15 @@
siteService.get($stateParams.siteId, function (site) {
cipherService.decryptSite(site).then(function (model) {
$scope.site = model;
if (model.password) {
var maskedPassword = '';
for (var i = 0; i < model.password.length; i++) {
maskedPassword += '•';
}
$scope.site.maskedPassword = maskedPassword;
}
});
});
});

View File

@ -28,11 +28,11 @@
</div>
<div class="list-section-item">
<span class="item-label">Password</span>
{{site.password}}
{{site.maskedPassword}}
</div>
</div>
</div>
<div class="list-section">
<div class="list-section" ng-show="site.notes">
<div class="list-section-header">
Notes
</div>