merge: feat/16-cbz-support dans develop (support CBZ)

This commit is contained in:
Git Agent
2026-08-23 11:54:13 +02:00
18 changed files with 366 additions and 15 deletions

View File

@ -13,7 +13,7 @@ import type {
UserDto
} from "@readabook/shared";
import { mockBooks, mockContinue, mockJobs, mockLibraries, mockProgress, mockUser } from "./mockData";
import type { ContinueItem, Session } from "./types";
import type { CbzPagesDto, ContinueItem, Session } from "./types";
const API_BASE = import.meta.env.VITE_API_BASE_URL ?? "";
@ -140,6 +140,12 @@ export const api = {
bookCoverUrl(id: number): string {
return `${API_BASE}/books/${id}/cover`;
},
async cbzPages(id: number): Promise<CbzPagesDto> {
return request<CbzPagesDto>(`/books/${id}/pages`);
},
cbzPageUrl(id: number, page: number): string {
return `${API_BASE}/books/${id}/pages/${page}`;
},
async progress(bookId: number): Promise<ProgressDto | null> {
try {
return await request<ProgressDto>(`/progress/${bookId}`, {