1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-27 17:18:04 +01:00

local mask function since encoding issue on jslib

This commit is contained in:
Kyle Spearrin 2018-03-13 08:56:24 -04:00
parent bce1fba6d2
commit 770f71d75d
2 changed files with 7 additions and 3 deletions

View File

@ -21,7 +21,7 @@ angular
cipherObj = cipher;
return cipher.decrypt();
}).then(function (model) {
$timeout(function() {
$timeout(function () {
$scope.cipher = model;
if (model.login && model.login.totp && (cipherObj.organizationUseTotp || tokenService.getPremium())) {
totpUpdateCode();
@ -159,6 +159,10 @@ angular
return year;
};
$scope.maskValue = function (value) {
return value ? '••••••••' : null;
};
function totpUpdateCode() {
if ($scope.cipher.type !== constantsService.cipherType.login || !$scope.cipher.login.totp) {
return;

View File

@ -45,7 +45,7 @@
</a>
</div>
<span class="item-label">{{i18n.password}}</span>
<span ng-show="!showPassword" class="monospaced">{{cipher.login.maskedPassword}}</span>
<span ng-show="!showPassword" class="monospaced">{{maskValue(cipher.login.password)}}</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">{{field.maskedValue}}</span>
<span ng-show="!field.showValue" class="monospaced">{{maskValue(field.value)}}</span>
<span ng-show="field.showValue" class="monospaced">{{field.value}}</span>
</div>
<div ng-if="field.type === constants.fieldType.boolean">