mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-08 09:43:42 +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;
|
cipherObj = cipher;
|
||||||
return cipher.decrypt();
|
return cipher.decrypt();
|
||||||
}).then(function (model) {
|
}).then(function (model) {
|
||||||
$timeout(function() {
|
$timeout(function () {
|
||||||
$scope.cipher = model;
|
$scope.cipher = model;
|
||||||
if (model.login && model.login.totp && (cipherObj.organizationUseTotp || tokenService.getPremium())) {
|
if (model.login && model.login.totp && (cipherObj.organizationUseTotp || tokenService.getPremium())) {
|
||||||
totpUpdateCode();
|
totpUpdateCode();
|
||||||
@ -159,6 +159,10 @@ angular
|
|||||||
return year;
|
return year;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.maskValue = function (value) {
|
||||||
|
return value ? '••••••••' : null;
|
||||||
|
};
|
||||||
|
|
||||||
function totpUpdateCode() {
|
function totpUpdateCode() {
|
||||||
if ($scope.cipher.type !== constantsService.cipherType.login || !$scope.cipher.login.totp) {
|
if ($scope.cipher.type !== constantsService.cipherType.login || !$scope.cipher.login.totp) {
|
||||||
return;
|
return;
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<span class="item-label">{{i18n.password}}</span>
|
<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>
|
<span id="password" ng-show="showPassword" class="monospaced">{{cipher.login.password}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-section-item totp" ng-class="{'low': totpLow}" ng-if="cipher.login.totp && totpCode">
|
<div class="list-section-item totp" ng-class="{'low': totpLow}" ng-if="cipher.login.totp && totpCode">
|
||||||
@ -219,7 +219,7 @@
|
|||||||
{{field.value || ' '}}
|
{{field.value || ' '}}
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="field.type === constants.fieldType.hidden">
|
<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>
|
<span ng-show="field.showValue" class="monospaced">{{field.value}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="field.type === constants.fieldType.boolean">
|
<div ng-if="field.type === constants.fieldType.boolean">
|
||||||
|
Loading…
Reference in New Issue
Block a user