types: add format_group, library_type_name, manga_type to ReaderMetadata
- Move ReaderMetadata from api.ts to reader.d.ts as global type - Add format_group field for format detection (reflowable/fixed_layout/comic_archive) - Add library_type_name for library type (ebooks/comics/manga/pdf) - Add manga_type for manga-specific reading direction metadata - Remove duplicate mime_type field and fix typo (unkown -> unknown)
This commit is contained in:
@@ -91,17 +91,6 @@ function handleError(error: unknown, context: string): void {
|
|||||||
// ============================================================
|
// ============================================================
|
||||||
// Reader API Functions
|
// Reader API Functions
|
||||||
// ============================================================
|
// ============================================================
|
||||||
interface ReaderMetadata {
|
|
||||||
media_item_id: string;
|
|
||||||
title: string;
|
|
||||||
author: string;
|
|
||||||
cover_image_path: string;
|
|
||||||
library_type: "ebook" | "comic" | "manga" | "pdf";
|
|
||||||
mime_type: string;
|
|
||||||
file_path: string;
|
|
||||||
chapter_metadata?: ChapterMetadata;
|
|
||||||
total_pages?: number;
|
|
||||||
}
|
|
||||||
interface ChapterMetadata {
|
interface ChapterMetadata {
|
||||||
chapters: Chapter[];
|
chapters: Chapter[];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import "../alpine";
|
||||||
|
import { Alpine } from "../alpine";
|
||||||
|
// Core utilities (minimal set needed by reader)
|
||||||
|
import "../api"; // API calls for reading progress
|
||||||
|
import "../dom"; // DOM helpers
|
||||||
|
import "../events"; // Event system
|
||||||
|
import "../storage"; // localStorage helpers
|
||||||
|
import "../theme"; // Theme support (reader needs theme)
|
||||||
|
import "../toast"; // Toast notifications
|
||||||
|
import "../toast-error"; // Error toasts
|
||||||
|
// Reader functionality
|
||||||
|
import "./reader-shell";
|
||||||
|
Alpine.start();
|
||||||
Vendored
+4
-1
@@ -76,8 +76,11 @@ interface ReaderMetadata {
|
|||||||
title: string;
|
title: string;
|
||||||
author: string;
|
author: string;
|
||||||
cover_image_path: string;
|
cover_image_path: string;
|
||||||
library_type: "ebook" | "comic" | "manga" | "pdf";
|
format_group: "reflowable" | "fixed_layout" | "comic_archive" | "unkown";
|
||||||
|
library_type_name: "ebooks" | "comics" | "manga" | "pdf";
|
||||||
mime_type: string;
|
mime_type: string;
|
||||||
|
mime_type: string;
|
||||||
|
manga_type: "unknown" | "no" | "yes" | "yes_and_right_to_left";
|
||||||
file_path: string;
|
file_path: string;
|
||||||
chapter_metadata?: ChapterMetadata;
|
chapter_metadata?: ChapterMetadata;
|
||||||
total_pages?: number;
|
total_pages?: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user