diff --git a/frontend/src/app/features/book/components/book-browser/book-browser.component.html b/frontend/src/app/features/book/components/book-browser/book-browser.component.html
index e3b8de086..f9e1ffec9 100644
--- a/frontend/src/app/features/book/components/book-browser/book-browser.component.html
+++ b/frontend/src/app/features/book/components/book-browser/book-browser.component.html
@@ -28,19 +28,24 @@
}
- @if (userService.currentUser(); as currentUser) {
- @if (entityType !== EntityType.ALL_BOOKS && entityType !== EntityType.UNSHELVED &&
- (currentUser.permissions.admin || currentUser.permissions.canManageLibrary)) {
-
- }
+ [attr.aria-label]="'common.moreActionsFor' | transloco: {label: menuTarget.entity.name}"
+ [appMenuTriggerFor]="entityMenu.menu()">
+
+
+ }
+
}
}
diff --git a/frontend/src/app/features/book/components/book-browser/book-browser.component.spec.ts b/frontend/src/app/features/book/components/book-browser/book-browser.component.spec.ts
index b342982d5..0d3823e4b 100644
--- a/frontend/src/app/features/book/components/book-browser/book-browser.component.spec.ts
+++ b/frontend/src/app/features/book/components/book-browser/book-browser.component.spec.ts
@@ -8,7 +8,6 @@ import {ConfirmationService, MessageService} from '@openng/optimus-ui/api';
import {PageTitleService} from '../../../../shared/service/page-title.service';
import {BookService} from '../../service/book.service';
import {BookMetadataManageService} from '../../service/book-metadata-manage.service';
-import {LibraryShelfMenuService} from '../../service/library-shelf-menu.service';
import {Book} from '../../model/book.model';
import {SortDirection, SortOption} from '../../model/sort.model';
import {UserService} from '../../../settings/user-management/user.service';
@@ -294,14 +293,6 @@ function createHarness(options?: {
getMetadataMenuItems: vi.fn(() => []),
},
},
- {
- provide: LibraryShelfMenuService,
- useValue: {
- initializeLibraryMenuItems: vi.fn(() => []),
- initializeMagicShelfMenuItems: vi.fn(() => []),
- initializeShelfMenuItems: vi.fn(() => []),
- },
- },
{provide: PageTitleService, useValue: {setPageTitle: vi.fn()}},
{provide: LoadingService, useValue: {show: vi.fn(), hide: vi.fn()}},
{provide: LocalStorageService, useValue: {get: vi.fn(), set: vi.fn()}},
diff --git a/frontend/src/app/features/book/components/book-browser/book-browser.component.ts b/frontend/src/app/features/book/components/book-browser/book-browser.component.ts
index 7f0f808eb..f1d5f8faa 100644
--- a/frontend/src/app/features/book/components/book-browser/book-browser.component.ts
+++ b/frontend/src/app/features/book/components/book-browser/book-browser.component.ts
@@ -11,13 +11,15 @@ import {DynamicDialogRef} from '@openng/optimus-ui/dynamicdialog';
import {Library} from '../../model/library.model';
import {SortDirection, SortOption} from '../../model/sort.model';
import {Book} from '../../model/book.model';
-import {LibraryShelfMenuService} from '../../service/library-shelf-menu.service';
+import {
+ LibraryShelfMenuComponent,
+ type LibraryShelfMenuTarget,
+} from '../library-shelf-menu/library-shelf-menu.component';
import {BookTableComponent} from './book-table/book-table.component';
-import {Button} from '@openng/optimus-ui/button';
+import {Button, ButtonDirective} from '@openng/optimus-ui/button';
import {NgClass} from '@angular/common';
import {BookCardComponent} from './book-card/book-card.component';
-import {Menu} from '@openng/optimus-ui/menu';
import {InputText} from '@openng/optimus-ui/inputtext';
import {FormsModule} from '@angular/forms';
import {BookFilterComponent} from './book-filter/book-filter.component';
@@ -59,6 +61,7 @@ import {filterBooksByFilters} from './filters/sidebar-filter';
import {LayoutService} from '../../../../shared/layout/layout.service';
import {createGridDensity} from '../../../../shared/util/grid-density.util';
import {DeferredRenderState} from './deferred-render-state';
+import {AppMenuTriggerDirective} from '../../../../shared/ui/menu/app-menu-trigger.directive';
export enum EntityType {
LIBRARY = 'Library',
@@ -81,9 +84,10 @@ const MOBILE_COLUMNS_STORAGE_KEY = 'mobileColumnsPreference';
styleUrls: ['./book-browser.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
- Button, BookCardComponent, Menu, InputText, FormsModule,
+ Button, ButtonDirective, BookCardComponent, InputText, FormsModule,
BookTableComponent, BookFilterComponent, Tooltip, NgClass, Popover,
Checkbox, Divider, MultiSelect, TieredMenu, Badge, MultiSortPopoverComponent, TranslocoDirective, TranslocoPipe, GridDensityButtonsComponent,
+ LibraryShelfMenuComponent, AppMenuTriggerDirective,
],
providers: [SeriesCollapseFilter],
})
@@ -105,7 +109,6 @@ export class BookBrowserComponent implements AfterViewInit {
private bookMetadataManageService = inject(BookMetadataManageService);
private dialogHelperService = inject(BookDialogHelperService);
private bookMenuService = inject(BookMenuService);
- private libraryShelfMenuService = inject(LibraryShelfMenuService);
private pageTitle = inject(PageTitleService);
private loadingService = inject(LoadingService);
private bookNavigationService = inject(BookNavigationService);
@@ -187,19 +190,17 @@ export class BookBrowserComponent implements AfterViewInit {
const {entityId, entityType} = this.entityInfo();
return this.entityService.getEntity(entityId, entityType);
});
- readonly entityOptions = computed