masked values from jslib

This commit is contained in:
Kyle Spearrin 2018-03-06 08:18:18 -05:00
parent 314f68a510
commit a234055e5f
3 changed files with 3 additions and 19 deletions

2
jslib

@ -1 +1 @@
Subproject commit 1f2cf2bcdfddc68a6d9ee0ed732d00c8bec65ad4
Subproject commit a3beb04f7e09d548bc5223a702f76b9f4e8a4991

View File

@ -23,13 +23,6 @@ angular
}).then(function (model) {
$timeout(function() {
$scope.cipher = model;
if (model.type == constantsService.cipherType.login && model.login) {
if (model.login.password) {
$scope.cipher.maskedPassword = $scope.maskValue(model.login.password);
}
}
if (model.login && model.login.totp && (cipherObj.organizationUseTotp || tokenService.getPremium())) {
totpUpdateCode();
totpTick();
@ -89,15 +82,6 @@ angular
toastr.info(i18n.browserNotSupportClipboard);
};
$scope.maskValue = function (value) {
if (!value) {
return value;
}
var masked = '••••••••';
return masked;
};
$scope.clipboardSuccess = function (e, type, aType) {
e.clearSelection();
$analytics.eventTrack('Copied ' + aType);

View File

@ -45,7 +45,7 @@
</a>
</div>
<span class="item-label">{{i18n.password}}</span>
<span ng-show="!showPassword" class="monospaced">{{cipher.maskedPassword}}</span>
<span ng-show="!showPassword" class="monospaced">{{cipher.login.maskedPassword}}</span>
<span id="password" ng-show="showPassword" class="monospaced">{{cipher.login.password}}</span>
</div>
<div class="list-section-item totp" ng-class="{'low': totpLow}" ng-if="cipher.login.totp && totpCode">
@ -219,7 +219,7 @@
{{field.value || '&nbsp;'}}
</div>
<div ng-if="field.type === constants.fieldType.hidden">
<span ng-show="!field.showValue" class="monospaced">{{maskValue(field.value)}}</span>
<span ng-show="!field.showValue" class="monospaced">{{field.maskedValue}}</span>
<span ng-show="field.showValue" class="monospaced">{{field.value}}</span>
</div>
<div ng-if="field.type === constants.fieldType.boolean">