refactor(webui): reuse entity links and formatters; drop stale component comments

This commit is contained in:
2026-11-25 12:11:21 +00:00
parent dccf04f840
commit 13a38a6631
8 changed files with 21 additions and 25 deletions
+3 -5
View File
@@ -12,9 +12,9 @@ import {
} from '@perfect-design/ui'
import { computed, ref } from 'vue'
import { useEntityLinks } from '@/composables/useEntityLinks'
import { NAV_GROUPS } from '@/lib/nav-groups'
import { paletteEntities } from '@/lib/palette-items'
import { PANEL_PAGE } from '@/lib/panel-selection'
import type { PanelKind } from '@/lib/panel-selection'
import { RANGE_KEYS } from '@/lib/range'
import { useDashboardStore } from '@/stores/dashboard'
@@ -39,11 +39,9 @@ function run(action: () => void): void {
search.value = ''
}
const { openEntity: openEntityLink } = useEntityLinks()
function openEntity(kind: PanelKind, id: string): void {
run(() => {
nav.goTo(PANEL_PAGE[kind])
nav.openPanel(kind, id)
})
run(() => openEntityLink(kind, id))
}
</script>