发布

  • v1397 4253c0e4fc

    feat(homecore-ui): wire nav router + States / Services / Settings pages

    frostbyte_neo 发布于 2026-05-26 16:39:33 +00:00

    Before: clicking Dashboard / States / Services / Settings highlighted
    the active nav button but the page content never changed. AppShell
    dispatched hc-navigate events but no listener acted on them.

    After (~232 LOC across 4 files):

    • main.ts (+20 LOC) tiny router: NAV_TO_TAG maps nav id → page
      custom element; on hc-navigate, swap the AppShell's child.
    • pages/States.ts (~86 LOC) HA-style entity table with 5 s refresh.
    • pages/Services.ts (~82 LOC) domain-grouped service registry,
      friendly empty state when no services registered.
    • pages/Settings.ts (~90 LOC) backend config readout + bearer-token
      editor (localStorage["homecore.token"]).

    Browser-verified all 4 nav clicks swap content; 0 console errors.
    Dashboard → 10 entity cards; States → 10-row table; Services →
    empty state (0 domains); Settings → config + token editor.

    Co-Authored-By: claude-flow ruv@ruv.net

    下载附件