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:
@@ -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
|
||||
);
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user