fix(web,api): lecteur — worker pdf.js dédié, shell commun et préférences par livre
Régression worker PDF : le worker pdf.js est désormais instancié une seule fois via un port dédié (?worker&url) et reconfiguré à chaque montage, au lieu d'un workerSrc recalculé qui cassait le rendu. - ReaderShell : chrome commun aux lecteurs (toolbar, zones de tap, statut) et contrat ReaderControls pour EPUB/PDF/CBZ - préférences de lecture par livre (mode horizontal/vertical, fit) : table reader_preferences + migrations idempotentes, module API, DTO partagés, client web avec fallback localStorage hors-ligne Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -128,6 +128,19 @@ export const UpdateProgressSchema = z.object({
|
||||
});
|
||||
export type UpdateProgressDto = z.infer<typeof UpdateProgressSchema>;
|
||||
|
||||
export const ReaderPreferencesSchema = z.object({
|
||||
mode: z.enum(["paged", "scrolled", "horizontal", "vertical"]).default("paged"),
|
||||
fit: z.enum(["page", "width", "height", "auto"]).nullable().default(null),
|
||||
updatedAt: z.string().optional()
|
||||
});
|
||||
export type ReaderPreferencesDto = z.infer<typeof ReaderPreferencesSchema>;
|
||||
|
||||
export const UpdateReaderPreferencesSchema = z.object({
|
||||
mode: z.enum(["paged", "scrolled", "horizontal", "vertical"]).optional(),
|
||||
fit: z.enum(["page", "width", "height", "auto"]).nullable().optional()
|
||||
});
|
||||
export type UpdateReaderPreferencesDto = z.infer<typeof UpdateReaderPreferencesSchema>;
|
||||
|
||||
export const JobSchema = z.object({
|
||||
id: z.number().int().positive(),
|
||||
type: z.string(),
|
||||
|
||||
Reference in New Issue
Block a user