fix(koreader): allow plugin API to reset read status to unread

The catalog read-status enum omitted unread, so a device write could only
be undone from the web dashboard. Add it to the settable enum and the
plugin status dialog, and mark Unread as current when a book has no
status row.

Closes #853
This commit is contained in:
neon
2026-08-02 17:38:45 +00:00
parent f4cfc3ca5d
commit 49e0b12e97
8 changed files with 203 additions and 4 deletions
+4 -2
View File
@@ -148,8 +148,10 @@ export type KoreaderCatalogSortOrder = "asc" | "desc";
export type KoreaderCatalogReadStatusFilter = "unread" | "reading" | "finished";
// Read statuses the catalog detail page can set on a book. A subset of the
// full ReadStatus enum, chosen for reading-device ergonomics.
export type KoreaderCatalogSettableReadStatus = "want_to_read" | "reading" | "on_hold" | "read" | "abandoned";
// full ReadStatus enum, chosen for reading-device ergonomics. "unread" is the
// default state, so it has to stay settable or a device write becomes a one-way
// door that only the web dashboard can undo.
export type KoreaderCatalogSettableReadStatus = "unread" | "want_to_read" | "reading" | "on_hold" | "read" | "abandoned";
export interface KoreaderCatalogSeriesSummary {
total: number;