1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-09-27 03:53:00 +02:00

Hide passwords functionality for desktop

This commit is contained in:
hinton 2020-05-27 22:41:57 +02:00
parent be320fbea1
commit 66de9e93fa
3 changed files with 5 additions and 5 deletions

View File

@ -28,9 +28,9 @@
<label for="loginPassword">{{'password' | i18n}}</label>
<input id="loginPassword" class="monospaced"
type="{{showPassword ? 'text' : 'password'}}" name="Login.Password"
[(ngModel)]="cipher.login.password">
[(ngModel)]="cipher.login.password" [disabled]="!cipher.viewPassword">
</div>
<div class="action-buttons">
<div class="action-buttons" *ngIf=cipher.viewPassword>
<button type="button" #checkPasswordBtn class="row-btn btn" appBlurClick
appA11yTitle="{{'checkPassword' | i18n}}" (click)="checkPassword()"
[appApiAction]="checkPasswordPromise" [disabled]="checkPasswordBtn.loading">

View File

@ -166,7 +166,7 @@ export class VaultComponent implements OnInit, OnDestroy {
const pComponent = this.addEditComponent == null ? this.viewComponent : this.addEditComponent;
const pCipher = pComponent != null ? pComponent.cipher : null;
if (this.cipherId != null && pCipher != null && pCipher.id === this.cipherId &&
pCipher.login != null && pCipher.login.password != null) {
pCipher.login != null && pCipher.login.password != null && pCipher.viewPassword) {
this.copyValue(pCipher.login.password, 'password');
}
break;
@ -299,7 +299,7 @@ export class VaultComponent implements OnInit, OnDestroy {
click: () => this.copyValue(cipher.login.username, 'username'),
}));
}
if (cipher.login.password != null) {
if (cipher.login.password != null && cipher.viewPassword) {
menu.append(new remote.MenuItem({
label: this.i18nService.t('copyPassword'),
click: () => {

View File

@ -33,7 +33,7 @@
<div [hidden]="!showPassword" class="monospaced password-wrapper" appSelectCopy
[innerHTML]="cipher.login.password | colorPassword"></div>
</div>
<div class="action-buttons">
<div class="action-buttons" *ngIf=cipher.viewPassword>
<button type="button" #checkPasswordBtn class="row-btn btn" appBlurClick
appA11yTitle="{{'checkPassword' | i18n}}" (click)="checkPassword()"
[appApiAction]="checkPasswordPromise" [disabled]="checkPasswordBtn.loading">