mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
fix bulk menu (#14079)
This commit is contained in:
@@ -52,10 +52,12 @@
|
|||||||
{{ "permission" | i18n }}
|
{{ "permission" | i18n }}
|
||||||
</th>
|
</th>
|
||||||
<th bitCell class="tw-w-12 tw-text-right">
|
<th bitCell class="tw-w-12 tw-text-right">
|
||||||
|
@let featureFlaggedDisable =
|
||||||
|
(limitItemDeletion$ | async) ? (disableMenu$ | async) : disableMenu;
|
||||||
<button
|
<button
|
||||||
[disabled]="disabled || isEmpty || disableMenu"
|
[disabled]="disabled || isEmpty || featureFlaggedDisable"
|
||||||
[bitMenuTriggerFor]="headerMenu"
|
[bitMenuTriggerFor]="headerMenu"
|
||||||
[attr.title]="disableMenu ? ('missingPermissions' | i18n) : ''"
|
[attr.title]="featureFlaggedDisable ? ('missingPermissions' | i18n) : ''"
|
||||||
bitIconButton="bwi-ellipsis-v"
|
bitIconButton="bwi-ellipsis-v"
|
||||||
size="small"
|
size="small"
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ export class VaultItemsComponent {
|
|||||||
protected selection = new SelectionModel<VaultItem>(true, [], true);
|
protected selection = new SelectionModel<VaultItem>(true, [], true);
|
||||||
protected canDeleteSelected$: Observable<boolean>;
|
protected canDeleteSelected$: Observable<boolean>;
|
||||||
protected canRestoreSelected$: Observable<boolean>;
|
protected canRestoreSelected$: Observable<boolean>;
|
||||||
|
protected disableMenu$: Observable<boolean>;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected cipherAuthorizationService: CipherAuthorizationService,
|
protected cipherAuthorizationService: CipherAuthorizationService,
|
||||||
@@ -140,6 +141,20 @@ export class VaultItemsComponent {
|
|||||||
}),
|
}),
|
||||||
map((canRestore) => canRestore && this.showBulkTrashOptions),
|
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() {
|
get showExtraColumn() {
|
||||||
|
|||||||
Reference in New Issue
Block a user