mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
Hide passwords functionality for desktop
This commit is contained in:
@@ -28,9 +28,9 @@
|
|||||||
<label for="loginPassword">{{'password' | i18n}}</label>
|
<label for="loginPassword">{{'password' | i18n}}</label>
|
||||||
<input id="loginPassword" class="monospaced"
|
<input id="loginPassword" class="monospaced"
|
||||||
type="{{showPassword ? 'text' : 'password'}}" name="Login.Password"
|
type="{{showPassword ? 'text' : 'password'}}" name="Login.Password"
|
||||||
[(ngModel)]="cipher.login.password">
|
[(ngModel)]="cipher.login.password" [disabled]="!cipher.viewPassword">
|
||||||
</div>
|
</div>
|
||||||
<div class="action-buttons">
|
<div class="action-buttons" *ngIf=cipher.viewPassword>
|
||||||
<button type="button" #checkPasswordBtn class="row-btn btn" appBlurClick
|
<button type="button" #checkPasswordBtn class="row-btn btn" appBlurClick
|
||||||
appA11yTitle="{{'checkPassword' | i18n}}" (click)="checkPassword()"
|
appA11yTitle="{{'checkPassword' | i18n}}" (click)="checkPassword()"
|
||||||
[appApiAction]="checkPasswordPromise" [disabled]="checkPasswordBtn.loading">
|
[appApiAction]="checkPasswordPromise" [disabled]="checkPasswordBtn.loading">
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
const pComponent = this.addEditComponent == null ? this.viewComponent : this.addEditComponent;
|
const pComponent = this.addEditComponent == null ? this.viewComponent : this.addEditComponent;
|
||||||
const pCipher = pComponent != null ? pComponent.cipher : null;
|
const pCipher = pComponent != null ? pComponent.cipher : null;
|
||||||
if (this.cipherId != null && pCipher != null && pCipher.id === this.cipherId &&
|
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');
|
this.copyValue(pCipher.login.password, 'password');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -299,7 +299,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
click: () => this.copyValue(cipher.login.username, 'username'),
|
click: () => this.copyValue(cipher.login.username, 'username'),
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
if (cipher.login.password != null) {
|
if (cipher.login.password != null && cipher.viewPassword) {
|
||||||
menu.append(new remote.MenuItem({
|
menu.append(new remote.MenuItem({
|
||||||
label: this.i18nService.t('copyPassword'),
|
label: this.i18nService.t('copyPassword'),
|
||||||
click: () => {
|
click: () => {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<div [hidden]="!showPassword" class="monospaced password-wrapper" appSelectCopy
|
<div [hidden]="!showPassword" class="monospaced password-wrapper" appSelectCopy
|
||||||
[innerHTML]="cipher.login.password | colorPassword"></div>
|
[innerHTML]="cipher.login.password | colorPassword"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="action-buttons">
|
<div class="action-buttons" *ngIf=cipher.viewPassword>
|
||||||
<button type="button" #checkPasswordBtn class="row-btn btn" appBlurClick
|
<button type="button" #checkPasswordBtn class="row-btn btn" appBlurClick
|
||||||
appA11yTitle="{{'checkPassword' | i18n}}" (click)="checkPassword()"
|
appA11yTitle="{{'checkPassword' | i18n}}" (click)="checkPassword()"
|
||||||
[appApiAction]="checkPasswordPromise" [disabled]="checkPasswordBtn.loading">
|
[appApiAction]="checkPasswordPromise" [disabled]="checkPasswordBtn.loading">
|
||||||
|
|||||||
Reference in New Issue
Block a user