From d87bd811908597f644c45f3b5def64f400b05f8e Mon Sep 17 00:00:00 2001 From: gamer147 Date: Mon, 29 Dec 2025 21:28:07 -0500 Subject: [PATCH] [FA-6] Volumes work probably? --- .../lib/components/ChapterNavigation.svelte | 19 +++- .../lib/components/ChapterReaderPage.svelte | 20 ++-- .../src/lib/components/NovelDetailPage.svelte | 104 ++++++++++++++---- .../ui/accordion/accordion-content.svelte | 20 ++++ .../ui/accordion/accordion-item.svelte | 15 +++ .../ui/accordion/accordion-trigger.svelte | 25 +++++ .../src/lib/components/ui/accordion/index.ts | 18 +++ .../src/lib/graphql/__generated__/graphql.ts | 77 ++++++++++--- .../src/lib/graphql/queries/chapter.graphql | 11 +- .../src/lib/graphql/queries/novel.graphql | 13 ++- .../src/lib/graphql/queries/novels.graphql | 7 +- .../[id]/chapters/[chapterNumber].astro | 10 -- .../[volumeId]/chapters/[chapterNumber].astro | 10 ++ 13 files changed, 286 insertions(+), 63 deletions(-) create mode 100644 fictionarchive-web-astro/src/lib/components/ui/accordion/accordion-content.svelte create mode 100644 fictionarchive-web-astro/src/lib/components/ui/accordion/accordion-item.svelte create mode 100644 fictionarchive-web-astro/src/lib/components/ui/accordion/accordion-trigger.svelte create mode 100644 fictionarchive-web-astro/src/lib/components/ui/accordion/index.ts delete mode 100644 fictionarchive-web-astro/src/pages/novels/[id]/chapters/[chapterNumber].astro create mode 100644 fictionarchive-web-astro/src/pages/novels/[id]/volumes/[volumeId]/chapters/[chapterNumber].astro diff --git a/fictionarchive-web-astro/src/lib/components/ChapterNavigation.svelte b/fictionarchive-web-astro/src/lib/components/ChapterNavigation.svelte index a15b2d1..088b8e6 100644 --- a/fictionarchive-web-astro/src/lib/components/ChapterNavigation.svelte +++ b/fictionarchive-web-astro/src/lib/components/ChapterNavigation.svelte @@ -6,22 +6,31 @@ interface Props { novelId: string; + prevChapterVolumeId: number | null | undefined; prevChapterOrder: number | null | undefined; + nextChapterVolumeId: number | null | undefined; nextChapterOrder: number | null | undefined; showKeyboardHints?: boolean; } - let { novelId, prevChapterOrder, nextChapterOrder, showKeyboardHints = true }: Props = $props(); + let { + novelId, + prevChapterVolumeId, + prevChapterOrder, + nextChapterVolumeId, + nextChapterOrder, + showKeyboardHints = true + }: Props = $props(); - const hasPrev = $derived(prevChapterOrder != null); - const hasNext = $derived(nextChapterOrder != null); + const hasPrev = $derived(prevChapterOrder != null && prevChapterVolumeId != null); + const hasNext = $derived(nextChapterOrder != null && nextChapterVolumeId != null);