diff --git a/booklore-ui/src/app/features/book/service/library-shelf-menu.service.ts b/booklore-ui/src/app/features/book/service/library-shelf-menu.service.ts index a737a310d..6b0eb9a62 100644 --- a/booklore-ui/src/app/features/book/service/library-shelf-menu.service.ts +++ b/booklore-ui/src/app/features/book/service/library-shelf-menu.service.ts @@ -244,6 +244,17 @@ export class LibraryShelfMenuService { this.dialogLauncherService.openMagicShelfEditDialog((entity?.id as number)); } }, + { + label: this.t.translate('book.shelfMenuService.magicShelf.exportJson'), + icon: 'pi pi-copy', + command: () => { + if (entity?.filterJson) { + navigator.clipboard.writeText(entity.filterJson).then(() => { + this.messageService.add({severity: 'success', summary: this.t.translate('common.success'), detail: this.t.translate('book.shelfMenuService.toast.magicShelfJsonCopiedDetail')}); + }); + } + } + }, { separator: true }, diff --git a/booklore-ui/src/app/features/magic-shelf/component/magic-shelf-component.html b/booklore-ui/src/app/features/magic-shelf/component/magic-shelf-component.html index 08eea088c..309355cb6 100644 --- a/booklore-ui/src/app/features/magic-shelf/component/magic-shelf-component.html +++ b/booklore-ui/src/app/features/magic-shelf/component/magic-shelf-component.html @@ -72,6 +72,16 @@ } + @if (showImportPanel) { +