From 1baae51a325f73bef08262446a85b0870ea3cfa5 Mon Sep 17 00:00:00 2001 From: neon <18559658+neonsolstice@users.noreply.github.com> Date: Mon, 1 Jun 2026 18:29:52 +0000 Subject: [PATCH] feat(client): prevent audiobook cover cropping in series view Closes #153 --- README.md | 1 - .../book/components/BookCoverCard.vue | 13 +- .../book/components/VirtualBookGrid.spec.ts | 82 ++++++++++++- .../book/components/VirtualBookGrid.vue | 62 +++++++++- .../__tests__/BookCoverCard.spec.ts | 16 ++- .../series/components/SeriesCard.spec.ts | 113 ++++++++++++++++++ .../features/series/components/SeriesCard.vue | 39 +++++- .../features/series/lib/cover-scale.test.ts | 28 +++++ client/src/features/series/lib/cover-scale.ts | 27 +++++ .../series/views/SeriesDetailView.spec.ts | 39 +++++- .../series/views/SeriesDetailView.vue | 45 ++++++- 11 files changed, 444 insertions(+), 21 deletions(-) create mode 100644 client/src/features/series/components/SeriesCard.spec.ts create mode 100644 client/src/features/series/lib/cover-scale.test.ts create mode 100644 client/src/features/series/lib/cover-scale.ts diff --git a/README.md b/README.md index fcf40cfd3..81f387033 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ A self-hosted library management and reading platform for ebooks, PDFs, audioboo [](https://github.com/bookorbit/bookorbit/actions/workflows/release.yml) [](https://codecov.io/gh/bookorbit/bookorbit) [](https://github.com/bookorbit/bookorbit/releases) -[](https://github.com/bookorbit/bookorbit/commits/main) [](LICENSE)
@@ -373,6 +375,7 @@ const secondaryLabelText = computed(() => resolveBookLabel(gridCardSecondaryLabe :is-audio="isAudiobook" :seed="book.title ?? String(book.id)" :alt="book.title ?? ''" + :frame-aspect-ratio="effectiveCoverAspectRatio" :image-class="isMissing ? 'brightness-50' : ''" :spine="!isAudiobook" @load="handleArtworkLoad" diff --git a/client/src/features/book/components/VirtualBookGrid.spec.ts b/client/src/features/book/components/VirtualBookGrid.spec.ts index 233ecf47e..52e9679e1 100644 --- a/client/src/features/book/components/VirtualBookGrid.spec.ts +++ b/client/src/features/book/components/VirtualBookGrid.spec.ts @@ -15,10 +15,15 @@ vi.mock('vue-virtual-scroller', () => ({ vi.mock('./BookCoverCard.vue', () => ({ default: { name: 'BookCoverCard', - props: ['book', 'selectionMode', 'selected', 'showLabel'], + props: ['book', 'selectionMode', 'selected', 'showLabel', 'coverAspectRatio'], emits: ['action', 'select', 'update:book'], template: - '', + '