mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
Fixed edit menu on admin console and removed favorite item on the admin console (#16982)
This commit is contained in:
@@ -794,6 +794,9 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
case "viewEvents":
|
||||
await this.viewEvents(event.item);
|
||||
break;
|
||||
case "editCipher":
|
||||
await this.editCipher(event.item);
|
||||
break;
|
||||
}
|
||||
} finally {
|
||||
this.processingEvent$.next(false);
|
||||
@@ -856,7 +859,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
* @param cipherView - When set, the cipher to be edited
|
||||
* @param cloneCipher - `true` when the cipher should be cloned.
|
||||
*/
|
||||
async editCipher(cipher: CipherView | undefined, cloneCipher: boolean) {
|
||||
async editCipher(cipher: CipherView | undefined, cloneCipher?: boolean) {
|
||||
if (
|
||||
cipher &&
|
||||
cipher.reprompt !== 0 &&
|
||||
|
||||
@@ -169,10 +169,12 @@
|
||||
|
||||
<bit-menu-divider *ngIf="showMenuDivider"></bit-menu-divider>
|
||||
|
||||
<button bitMenuItem type="button" (click)="toggleFavorite()">
|
||||
<i class="bwi bwi-fw bwi-star" aria-hidden="true"></i>
|
||||
{{ (cipher.favorite ? "unfavorite" : "favorite") | i18n }}
|
||||
</button>
|
||||
@if (!viewingOrgVault) {
|
||||
<button bitMenuItem type="button" (click)="toggleFavorite()">
|
||||
<i class="bwi bwi-fw bwi-star" aria-hidden="true"></i>
|
||||
{{ (cipher.favorite ? "unfavorite" : "favorite") | i18n }}
|
||||
</button>
|
||||
}
|
||||
<button bitMenuItem type="button" (click)="editCipher()" *ngIf="canEditCipher">
|
||||
<i class="bwi bwi-fw bwi-pencil-square" aria-hidden="true"></i>
|
||||
{{ "edit" | i18n }}
|
||||
|
||||
Reference in New Issue
Block a user