Shell shortcuts: /, D, [ ], Ctrl+K palette + neighbors endpoint

Backend:
- GET /api/files/{md5}/neighbors/ returns previous/next items in the
  current ordering (name, size, created_at) for keyboard navigation

Frontend:
- / focuses the library search input
- D downloads the file on the detail page
- [ and ] navigate to the previous/next item; hint shown on the page
- Ctrl/Cmd+K opens a command palette (navigation, toggle filters,
  focus search, log in/out); Escape closes it
- Sort order now persists alongside the other library filters so
  prev/next stays consistent
This commit is contained in:
2026-09-17 08:33:22 -05:00
parent 063305c552
commit a09ab8a160
8 changed files with 324 additions and 10 deletions
+5
View File
@@ -9,6 +9,8 @@ interface UiState {
setRatings: (ratings: string[]) => void;
perPage: number;
setPerPage: (perPage: number) => void;
ordering: string;
setOrdering: (ordering: string) => void;
}
export const useUi = create<UiState>()(
@@ -23,6 +25,9 @@ export const useUi = create<UiState>()(
perPage: 48,
setPerPage: (perPage) => set({ perPage }),
ordering: "-created_at",
setOrdering: (ordering) => set({ ordering }),
}),
{ name: "j621.ui" },
),