mask password on site view
This commit is contained in:
parent
8fc611e4a5
commit
8d4d2df8ad
|
@ -6,6 +6,15 @@
|
||||||
siteService.get($stateParams.siteId, function (site) {
|
siteService.get($stateParams.siteId, function (site) {
|
||||||
cipherService.decryptSite(site).then(function (model) {
|
cipherService.decryptSite(site).then(function (model) {
|
||||||
$scope.site = model;
|
$scope.site = model;
|
||||||
|
|
||||||
|
if (model.password) {
|
||||||
|
var maskedPassword = '';
|
||||||
|
for (var i = 0; i < model.password.length; i++) {
|
||||||
|
maskedPassword += '•';
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.site.maskedPassword = maskedPassword;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -28,11 +28,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="list-section-item">
|
<div class="list-section-item">
|
||||||
<span class="item-label">Password</span>
|
<span class="item-label">Password</span>
|
||||||
{{site.password}}
|
{{site.maskedPassword}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-section">
|
<div class="list-section" ng-show="site.notes">
|
||||||
<div class="list-section-header">
|
<div class="list-section-header">
|
||||||
Notes
|
Notes
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue