1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 13:53:34 +00:00

Fixed edit menu on admin console and removed favorite item on the admin console (#16982)

This commit is contained in:
SmithThe4th
2025-10-29 10:31:21 -04:00
committed by GitHub
parent 5b815c4ae4
commit 4d00d0caa5
2 changed files with 10 additions and 5 deletions

View File

@@ -794,6 +794,9 @@ export class VaultComponent implements OnInit, OnDestroy {
case "viewEvents": case "viewEvents":
await this.viewEvents(event.item); await this.viewEvents(event.item);
break; break;
case "editCipher":
await this.editCipher(event.item);
break;
} }
} finally { } finally {
this.processingEvent$.next(false); this.processingEvent$.next(false);
@@ -856,7 +859,7 @@ export class VaultComponent implements OnInit, OnDestroy {
* @param cipherView - When set, the cipher to be edited * @param cipherView - When set, the cipher to be edited
* @param cloneCipher - `true` when the cipher should be cloned. * @param cloneCipher - `true` when the cipher should be cloned.
*/ */
async editCipher(cipher: CipherView | undefined, cloneCipher: boolean) { async editCipher(cipher: CipherView | undefined, cloneCipher?: boolean) {
if ( if (
cipher && cipher &&
cipher.reprompt !== 0 && cipher.reprompt !== 0 &&

View File

@@ -169,10 +169,12 @@
<bit-menu-divider *ngIf="showMenuDivider"></bit-menu-divider> <bit-menu-divider *ngIf="showMenuDivider"></bit-menu-divider>
@if (!viewingOrgVault) {
<button bitMenuItem type="button" (click)="toggleFavorite()"> <button bitMenuItem type="button" (click)="toggleFavorite()">
<i class="bwi bwi-fw bwi-star" aria-hidden="true"></i> <i class="bwi bwi-fw bwi-star" aria-hidden="true"></i>
{{ (cipher.favorite ? "unfavorite" : "favorite") | i18n }} {{ (cipher.favorite ? "unfavorite" : "favorite") | i18n }}
</button> </button>
}
<button bitMenuItem type="button" (click)="editCipher()" *ngIf="canEditCipher"> <button bitMenuItem type="button" (click)="editCipher()" *ngIf="canEditCipher">
<i class="bwi bwi-fw bwi-pencil-square" aria-hidden="true"></i> <i class="bwi bwi-fw bwi-pencil-square" aria-hidden="true"></i>
{{ "edit" | i18n }} {{ "edit" | i18n }}