feat: upload flow revamp (0.20.0)

- `/upload` is now manga-only with optional N initial chapters
  staged inline.
- Additional chapters from a new `/manga/[id]/upload-chapter` route,
  reached via an "Upload chapter" button on the manga page.
- New `ChapterPagesEditor` component: thumbnails next to each row,
  click-to-preview-modal, drag-drop + reorder.
- Pages renamed to `page-NNN.<ext>` before multipart submission;
  original filenames shown as dimmed reference text during upload
  and dropped on submit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-05-17 18:59:22 +02:00
parent 21f44cea3f
commit c95c1805df
12 changed files with 1283 additions and 553 deletions

View File

@@ -14,6 +14,7 @@
import AddToCollectionModal from '$lib/components/AddToCollectionModal.svelte';
import Plus from '@lucide/svelte/icons/plus';
import FolderPlus from '@lucide/svelte/icons/folder-plus';
import UploadCloud from '@lucide/svelte/icons/upload-cloud';
let { data } = $props();
const manga = $derived(data.manga);
@@ -323,6 +324,14 @@
<FolderPlus size={16} aria-hidden="true" />
<span>Add to collection</span>
</button>
<a
class="action"
href="/manga/{manga.id}/upload-chapter"
data-testid="upload-chapter-link"
>
<UploadCloud size={16} aria-hidden="true" />
<span>Upload chapter</span>
</a>
</div>
{:else}
<a class="action" href="/login" data-testid="bookmark-signin">