fix(reader): drop "Chapter N:" prefix from chapter title display (0.51.2)
The chapter list on the manga detail page, the reader's chapter-select
dropdown, the continuous-mode chapter bar, the browser tab title, and
the profile upload-history entries all prepended "Chapter {number}:"
in front of the crawled site title. Source titles already include
"Ch.N" themselves and the manga page renders chapters inside an <ol>,
so the prefix duplicated information the user could already see.
A small chapterLabel(c) helper in $lib/api/chapters returns the site
title as-is, falling back to "Chapter {number}" only when the
crawler captured an empty title (link/option stays non-empty). The
five render sites now call it. The previous-/next-chapter nav
buttons still read "Previous chapter (Ch. N)" / "Next chapter (Ch. N)"
since those are wayfinding labels, not title display.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
type TagRef
|
||||
} from '$lib/api/mangas';
|
||||
import { resyncManga } from '$lib/api/admin';
|
||||
import { chapterLabel } from '$lib/api/chapters';
|
||||
import { listTags, type Tag } from '$lib/api/tags';
|
||||
import { session } from '$lib/session.svelte';
|
||||
import Chip from '$lib/components/Chip.svelte';
|
||||
@@ -45,6 +46,11 @@
|
||||
continueChapter?.number ?? readProgress?.chapter_number ?? null
|
||||
);
|
||||
const continueChapterTitle = $derived(continueChapter?.title ?? null);
|
||||
const continueLabel = $derived(
|
||||
continueChapterNumber != null
|
||||
? chapterLabel({ number: continueChapterNumber, title: continueChapterTitle })
|
||||
: null
|
||||
);
|
||||
|
||||
const authors = $derived<AuthorRef[]>(manga.authors);
|
||||
const genres = $derived<GenreRef[]>(manga.genres);
|
||||
@@ -431,7 +437,7 @@
|
||||
>
|
||||
<span class="continue-label">Continue reading</span>
|
||||
<span class="continue-target">
|
||||
Chapter {continueChapterNumber}{#if continueChapterTitle}: {continueChapterTitle}{/if}
|
||||
{continueLabel}
|
||||
{#if readProgress && readProgress.page > 1}
|
||||
— page {readProgress.page}
|
||||
{/if}
|
||||
@@ -445,7 +451,7 @@
|
||||
{#each chapters as c (c.id)}
|
||||
<li>
|
||||
<a href="/manga/{manga.id}/chapter/{c.id}">
|
||||
Chapter {c.number}{#if c.title}: {c.title}{/if}
|
||||
{chapterLabel(c)}
|
||||
</a>
|
||||
<span class="pages">({c.page_count} pages)</span>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user