feat(webui): overview page

This commit is contained in:
2026-11-25 11:52:36 +00:00
parent 6c151d3515
commit d2334d879b
12 changed files with 1027 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
import type { AttentionLink } from '@/lib/attention'
import { PANEL_PAGE, parseSel } from '@/lib/panel-selection'
import type { PanelKind } from '@/lib/panel-selection'
import { useNavStore } from '@/stores/nav'
/** Navigation helpers for rows that link to a directory page or one of its detail panels. */
export function useEntityLinks() {
const nav = useNavStore()
function openEntity(kind: PanelKind, id: string): void {
nav.goTo(PANEL_PAGE[kind])
nav.openPanel(kind, id)
}
function openLink(link: AttentionLink): void {
const sel = parseSel(link.sel)
if (!sel) {
nav.goTo(link.page, {}, { replace: false })
return
}
nav.goTo(link.page)
nav.openPanel(sel.kind, sel.id)
}
return { openEntity, openLink }
}