mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
masked values from jslib
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 1f2cf2bcdf...a3beb04f7e
@@ -23,13 +23,6 @@ angular
|
|||||||
}).then(function (model) {
|
}).then(function (model) {
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.cipher = model;
|
$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())) {
|
if (model.login && model.login.totp && (cipherObj.organizationUseTotp || tokenService.getPremium())) {
|
||||||
totpUpdateCode();
|
totpUpdateCode();
|
||||||
totpTick();
|
totpTick();
|
||||||
@@ -89,15 +82,6 @@ angular
|
|||||||
toastr.info(i18n.browserNotSupportClipboard);
|
toastr.info(i18n.browserNotSupportClipboard);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.maskValue = function (value) {
|
|
||||||
if (!value) {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
var masked = '••••••••';
|
|
||||||
return masked;
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.clipboardSuccess = function (e, type, aType) {
|
$scope.clipboardSuccess = function (e, type, aType) {
|
||||||
e.clearSelection();
|
e.clearSelection();
|
||||||
$analytics.eventTrack('Copied ' + aType);
|
$analytics.eventTrack('Copied ' + aType);
|
||||||
|
|||||||
@@ -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.maskedPassword}}</span>
|
<span ng-show="!showPassword" class="monospaced">{{cipher.login.maskedPassword}}</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">{{maskValue(field.value)}}</span>
|
<span ng-show="!field.showValue" class="monospaced">{{field.maskedValue}}</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">
|
||||||
|
|||||||
Reference in New Issue
Block a user