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
+9
View File
@@ -0,0 +1,9 @@
export function isTypingTarget(target: EventTarget | null): boolean {
if (!(target instanceof HTMLElement)) return false;
return (
target.tagName === "INPUT" ||
target.tagName === "TEXTAREA" ||
target.tagName === "SELECT" ||
target.isContentEditable
);
}
+10
View File
@@ -54,3 +54,13 @@ export interface SystemStatus {
};
server_time_ms: number;
}
export interface FileNeighbor {
md5: string;
filename: string;
}
export interface FileNeighbors {
previous: FileNeighbor | null;
next: FileNeighbor | null;
}