books-ui: library, detail page, EPUB/PDF reader, reading status/rating/sessions migration, progress/notes APIs, owner gating and tests

This commit is contained in:
2026-10-24 01:06:33 +00:00
parent 8b2dfed239
commit 9c46e281c2
65 changed files with 25709 additions and 24 deletions

View File

@@ -0,0 +1,12 @@
import { isOwner } from '#lib/server/owner.js';
import { libraryCards, libraryStats } from '#lib/server/books/library.js';
import type { PageServerLoad } from './$types';
// Public catalogue: covers, titles, status, progress and rating. Files, formats and
// placeholders (no file yet) are only included for the owner.
export const load: PageServerLoad = async (event) => {
const owner = isOwner(event);
if (owner) event.setHeaders({ 'cache-control': 'private, no-store' });
const [books, stats] = await Promise.all([libraryCards(owner), libraryStats()]);
return { books, stats, owner };
};