Add saved filter views, a customisable dashboard, server comparison, row keyboard navigation and share links
- Table search, status, tag and sort live in the address; Save view pins one as a favourite. - Dashboard cards can be moved and hidden per user (users.dashboard_layout, migration 0022). - Compare two to four servers' load, memory or disk on one chart. - j/k move through table rows that open a detail panel. - Share links open a read-only wall without signing in, numbers only or with names (share_links, migration 0023); the wall is split into a shared view over two data sources. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
906220040e
commit
44e393f172
50 files changed
+6114
-258
No files matched your search
@@ -13,7 +13,7 @@ function isTyping(target: EventTarget | null): boolean {
|
||||
|
||||
/**
|
||||
* Page shortcuts for anyone signed in: "g" then a letter goes to a page they are allowed to see, "/" jumps to the table's
|
||||
* search box, "?" shows the list. Ignored while typing, while a dialog is open, and with Ctrl/Alt/Cmd held (those are the
|
||||
* search box, "j" and "k" move down and up the table's rows (Enter then opens the one you are on), "?" shows the list. Ignored while typing, while a dialog is open, and with Ctrl/Alt/Cmd held (those are the
|
||||
* browser's and the command palette's).
|
||||
*/
|
||||
export function useShortcuts(user: CurrentUser): void {
|
||||
@@ -47,7 +47,16 @@ export function useShortcuts(user: CurrentUser): void {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (e.key === "g") {
|
||||
if (e.key === "j" || e.key === "k") {
|
||||
const rows = [...document.querySelectorAll<HTMLElement>("tr.row-clickable")].filter((r) => r.offsetParent !== null);
|
||||
if (rows.length === 0) return;
|
||||
const current = (document.activeElement as HTMLElement | null)?.closest<HTMLElement>("tr.row-clickable") ?? null;
|
||||
const at = current ? rows.indexOf(current) : -1;
|
||||
const next = e.key === "j" ? rows[Math.min(at + 1, rows.length - 1)] : rows[Math.max(at - 1, 0)];
|
||||
e.preventDefault();
|
||||
next.focus();
|
||||
next.scrollIntoView({ block: "nearest" });
|
||||
} else if (e.key === "g") {
|
||||
waitingForSecondKey = true;
|
||||
timer = setTimeout(reset, 1200);
|
||||
} else if (e.key === "[") {
|
||||
|
||||
Reference in new issue
Block a user