mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
local mask function since encoding issue on jslib
This commit is contained in:
parent
bce1fba6d2
commit
770f71d75d
@ -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;
|
||||
|
@ -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 || ' '}}
|
||||
</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">
|
||||
|
Loading…
Reference in New Issue
Block a user