feat(reader): comic treatment for fixed-layout items in comics/manga libraries
PDFs shelved in comics or manga libraries (scanned manga, official manga PDFs with text layers) now get comic reader treatment: bookmarks only — no text-selection highlights, no annotations, no in-book search. Items in ebooks libraries are completely unaffected, and EPUBs keep their existing behavior everywhere. - handlers: new exported ShouldTreatAsComic(libraryType, formatGroup) — true for fixed_layout/comic_archive in manga/comics libraries; the reader JSON API also exposes it as treat_as_comic - router: the SSR reader page fetches the library type and passes TreatAsComic through ReaderMetadata into the init config - reader: when treatAsComic is set, the PDF textLayer selection listener (mouse and touch paths) never attaches so no highlight popover can open; pointer mode is forced to pan (Smart/Text segment hidden); search button and toggleSearch are disabled; previously-created PDF highlights stop rendering - bookmarks are unchanged (already page-index based for fixed layout), and device sync / OPDS / format classification are untouched since format_group stays fixed_layout
This commit is contained in:
@@ -243,6 +243,9 @@ type ReaderMetadata struct {
|
||||
LibraryID string `json:"library_id"`
|
||||
TotalCharacters int64 `json:"total_characters"`
|
||||
EstimatedPages int `json:"estimated_pages"`
|
||||
// TreatAsComic: fixed-layout item in a comics/manga library gets
|
||||
// comic reader treatment (bookmarks only — no highlights, no search).
|
||||
TreatAsComic bool `json:"treat_as_comic"`
|
||||
}
|
||||
|
||||
type ReadingProgress struct {
|
||||
|
||||
Reference in New Issue
Block a user