mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
[PM-22614] replace disable cipher menu with hide (#15194)
* replace the disableMenu logic to be a hideMenu with ngIf * adding disable back for disabled rows during vault sync --------- Co-authored-by: kejaeger <138028972+kejaeger@users.noreply.github.com>
This commit is contained in:
@@ -189,8 +189,14 @@ export class VaultCipherRowComponent<C extends CipherViewLike> implements OnInit
|
||||
return this.i18nService.t("noAccess");
|
||||
}
|
||||
|
||||
protected get showCopyUsername(): boolean {
|
||||
const usernameCopy = CipherViewLikeUtils.hasCopyableValue(this.cipher, "username");
|
||||
return this.isNotDeletedLoginCipher && usernameCopy;
|
||||
}
|
||||
|
||||
protected get showCopyPassword(): boolean {
|
||||
return this.isNotDeletedLoginCipher && this.cipher.viewPassword;
|
||||
const passwordCopy = CipherViewLikeUtils.hasCopyableValue(this.cipher, "password");
|
||||
return this.isNotDeletedLoginCipher && this.cipher.viewPassword && passwordCopy;
|
||||
}
|
||||
|
||||
protected get showCopyTotp(): boolean {
|
||||
@@ -201,16 +207,20 @@ export class VaultCipherRowComponent<C extends CipherViewLike> implements OnInit
|
||||
return this.isNotDeletedLoginCipher && this.canLaunch;
|
||||
}
|
||||
|
||||
protected get disableMenu() {
|
||||
protected get isDeletedCanRestore(): boolean {
|
||||
return CipherViewLikeUtils.isDeleted(this.cipher) && this.canRestoreCipher;
|
||||
}
|
||||
|
||||
protected get hideMenu() {
|
||||
return !(
|
||||
this.isNotDeletedLoginCipher ||
|
||||
this.isDeletedCanRestore ||
|
||||
this.showCopyUsername ||
|
||||
this.showCopyPassword ||
|
||||
this.showCopyTotp ||
|
||||
this.showLaunchUri ||
|
||||
this.showAttachments ||
|
||||
this.showClone ||
|
||||
this.canEditCipher ||
|
||||
(CipherViewLikeUtils.isDeleted(this.cipher) && this.canRestoreCipher)
|
||||
this.canEditCipher
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user