From bfc98131a907d4ee063716cfd7dc636db905fd28 Mon Sep 17 00:00:00 2001 From: thomascolden585-svg Date: Thu, 14 May 2026 11:22:12 -0400 Subject: [PATCH] feat(dashboard): add stats panel and refresh layout --- src/pages/DashboardPage.tsx | 201 +++++++++++++++++++++++++----------- 1 file changed, 139 insertions(+), 62 deletions(-) diff --git a/src/pages/DashboardPage.tsx b/src/pages/DashboardPage.tsx index 86811c6..46b2583 100644 --- a/src/pages/DashboardPage.tsx +++ b/src/pages/DashboardPage.tsx @@ -1,18 +1,60 @@ import React from 'react'; -import { Grid, Stack, Typography } from '@mui/material'; +import { + Box, + Divider, + Grid, + Stack, + Typography, + keyframes, + useTheme, +} from '@mui/material'; import { BlockIndicator, EventFeed, MinerRatesTable, OrderbookDepth, ReservationsTracker, + StatsPanel, SwapTracker, Page, SEO, } from '../components'; import { FONTS } from '../theme'; +const livePulse = keyframes` + 0%, 100% { opacity: 1; transform: scale(1); } + 50% { opacity: 0.45; transform: scale(0.85); } +`; + const DashboardPage: React.FC = () => { + const theme = useTheme(); + const isDark = theme.palette.mode === 'dark'; + + // Mode-aware accents: dark mode uses calmer indigo + emerald with a soft glow; + // light mode keeps the existing royal-blue / neon-green palette. + const accentColor = isDark ? '#5b8def' : theme.palette.primary.main; + const liveDotColor = isDark ? '#10b981' : '#22c55e'; + const liveDotGlow = isDark ? `0 0 8px ${liveDotColor}99` : 'none'; + const panelBg = isDark ? 'surface.elevated' : 'surface.light'; + + const panelSx = { + p: { xs: 1.5, sm: 2, md: 2.5 }, + borderRadius: 0, + backgroundColor: panelBg, + border: '1px solid', + borderColor: 'divider', + position: 'relative' as const, + '&::before': { + content: '""', + position: 'absolute' as const, + top: 0, + left: 0, + height: 2, + width: 32, + backgroundColor: accentColor, + }, + }; + return ( { mx: 'auto', }} > + {/* ── Hero ─────────────────────────────────────────────── */} - + + Network Activity / SN7 + + + Dashboard + + + Real-time view of miner rates, orderbook depth, active + reservations, and on-chain swap activity across the Allways + network. + + + + - Network Activity - - + + + + Live + + + + + + + + {/* ── KPI strip ────────────────────────────────────────── */} + + + + + {/* ── Main grid ───────────────────────────────────────── */} - + - + - + - + - +