mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 05:13:29 +00:00
fix bulk menu (#14079)
This commit is contained in:
@@ -85,6 +85,7 @@ export class VaultItemsComponent {
|
||||
protected selection = new SelectionModel<VaultItem>(true, [], true);
|
||||
protected canDeleteSelected$: Observable<boolean>;
|
||||
protected canRestoreSelected$: Observable<boolean>;
|
||||
protected disableMenu$: Observable<boolean>;
|
||||
|
||||
constructor(
|
||||
protected cipherAuthorizationService: CipherAuthorizationService,
|
||||
@@ -140,6 +141,20 @@ export class VaultItemsComponent {
|
||||
}),
|
||||
map((canRestore) => canRestore && this.showBulkTrashOptions),
|
||||
);
|
||||
|
||||
this.disableMenu$ = combineLatest([this.limitItemDeletion$, this.canDeleteSelected$]).pipe(
|
||||
map(([enabled, canDelete]) => {
|
||||
if (enabled) {
|
||||
return (
|
||||
!this.bulkMoveAllowed &&
|
||||
!this.showAssignToCollections() &&
|
||||
!canDelete &&
|
||||
!this.showBulkEditCollectionAccess
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
get showExtraColumn() {
|
||||
|
||||
Reference in New Issue
Block a user