Skip to content

Dashboard: modernize layout and refine dark-theme palette #93

@kal0528

Description

@kal0528

Layout / structure

  • Hero block at the top of src/pages/DashboardPage.tsx: primary-blue eyebrow Network Activity / SN74, a display Dashboard title (responsive 2rem → 3rem), and a one-line subtitle.
  • Live status pill on the right of the hero: bordered container holding a pulsing dot + LIVE label, a vertical divider, and the existing BlockIndicator. Replaces the loose floating block counter.
  • KPI strip below the hero: mount the already-exported but previously unused StatsPanel.
  • Panel accent bars: each grid panel gets a 2px × 32px accent bar in the top-left via ::before, giving every section a clear anchor without adding chrome.
  • De-duplicated panel styles: the five copies of the same Stack sx block collapse into a shared panelSx constant; cards that need a fixed height pass it via spread.
  • Horizontal rule separating hero from content for a more deliberate vertical rhythm.

Dark-theme color refinements

Light mode is unchanged. In dark mode, mode-aware constants drive the
accents so the page no longer leans on neon-bright defaults against the
woodsmoke (#090b0d) background:

Element Before After (dark)
Live status dot #22c55e (neon) #10b981 emerald-500 + soft glow ring
Panel accent bar #0052ff brand royal blue #5b8def calmer indigo-blue
Hero eyebrow primary.main matches accent (#5b8def)
Panel background surface.light (#131517) surface.elevated (#1d1f20) — a touch more depth

Mode is detected with useTheme() and the values flow through accent /
liveColor constants at the top of the file, so future palette tweaks
are one-line changes. Light mode also bumps the live dot from #22c55e
to #16a34a (green-600) so it doesn't read as cartoony on white.

Out of scope

  • The individual panel components (MinerRatesTable, OrderbookDepth, ReservationsTracker, EventFeed, SwapTracker) are untouched — they already own their headers and copy.
  • No theme changes; square corners and mono fonts preserved.

Test plan

  • npm run dev → open / in light theme: hero, live pulse, block counter render; accent bars and eyebrow are brand #0052ff.
  • Toggle to dark theme: live dot is emerald with subtle glow ring, accent bars and eyebrow are indigo #5b8def, panels read against surface.elevated.
  • KPI strip populates with live numbers once /stats resolves (skeleton → values).
  • Block number animates on new blocks (existing BlockIndicator behavior) inside the status pill.
  • Live dot pulses ~1.6s cycle; no layout jitter from the keyframes scale.
  • Resize 360px → 1400px: hero collapses to column below sm, panel accent bars stay flush to top-left, grid reflows as before.
  • npm run build passes.
  • npm run lint passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions