1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 13:53:34 +00:00

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

Submodule jslib updated: 1f2cf2bcdf...a3beb04f7e

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">