feat(series): multi-field search, sort-direction toggle, apply placement

Toolbar feedback round: the series search box now matches whatever the
main search matches for a group — series NAME, any book's AUTHOR, and
any book's TITLE inside the series (WHERE EXISTS per group-row, so
counts stay true); the separate author input is gone from the toolbar
(the author= param stays live for the JSON API and deep links). The
sort control becomes a base-key select (Date added/Name/Author/Books/
Progress/Last read) plus a chevron direction toggle that flips and
resubmits; sort/dir compose through ResolveSeriesSort (full registry
keys keep working for back-compat, unknown base keys fall to recent).
The search/apply button moved next to the search box as requested, and
default URLs stay clean (sort/dir only emitted once the user chooses).
This commit is contained in:
John O'Keefe committed 2026-10-27 19:05:23 -04:00
1 parent 14285ff314
commit 96c1228805
11 files changed
+504 -149

No files matched your search

+10
View File
@@ -26,4 +26,14 @@ Alpine.data("seriesPage", () => ({
onSwitch: navigateToSeries,
});
},
// flipSortDir inverts the direction hidden input and resubmits the
// plain-GET filter form (the URL stays the single source of truth).
flipSortDir() {
const input = this.$refs.sortDir as HTMLInputElement | undefined;
if (!input) return;
input.value = input.value === "asc" ? "desc" : "asc";
const form = input.closest("form") as HTMLFormElement | null;
if (form) form.requestSubmit();
},
}));