feat: apply Carbon theme — amber accent, Inter/JetBrains Mono, sharp corners, Lucide icons preserved

Carbon palette: #111111/#0d0d0d backgrounds, #1e1e1e borders, traffic-light
data colors (green/red/sky/amber), 10px uppercase card headers, StatCard
colored border-tops, Layout sidebar amber bar + right nav indicator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Johnson (via Claude) 2026-06-10 14:37:33 +00:00
commit 6b08cdc004
8 changed files with 142 additions and 168 deletions

View file

@ -89,18 +89,16 @@ export default function Layout({ children }: LayoutProps) {
}) })
return ( return (
<div className="flex h-screen overflow-hidden bg-bg text-slate-200"> <div className="flex h-screen overflow-hidden bg-bg text-white">
{/* Sidebar */} {/* Sidebar */}
<aside className="w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto"> <aside className="w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto">
{/* Logo */} {/* Logo */}
<div className="p-5 border-b border-border"> <div className="p-5 border-b border-border">
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<div className="w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center text-white font-bold text-xl"> <div className="w-[3px] h-8 bg-accent flex-shrink-0" />
M
</div>
<div> <div>
<div className="font-semibold text-lg">MeshAI</div> <div className="font-sans font-bold text-white text-lg">MeshAI</div>
<div className="text-xs text-slate-500 font-mono"> <div className="text-xs font-mono text-[#333]">
v{status?.version || '...'} v{status?.version || '...'}
</div> </div>
</div> </div>
@ -116,14 +114,14 @@ export default function Layout({ children }: LayoutProps) {
<Link <Link
key={item.path} key={item.path}
to={item.path} to={item.path}
className={`flex items-center gap-3 px-5 py-3 text-sm transition-colors relative ${ className={`flex items-center gap-3 px-5 py-3 text-sm font-sans transition-colors relative ${
isActive isActive
? 'text-blue-400 bg-blue-500/10' ? 'text-white'
: 'text-slate-400 hover:text-slate-200 hover:bg-bg-hover' : 'text-[#444] hover:text-[#888]'
}`} }`}
> >
{isActive && ( {isActive && (
<div className="absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500" /> <div className="absolute right-0 top-0 bottom-0 w-0.5 bg-accent" />
)} )}
<Icon size={18} /> <Icon size={18} />
{item.label} {item.label}
@ -140,15 +138,15 @@ export default function Layout({ children }: LayoutProps) {
status?.connected ? 'bg-green-500' : 'bg-red-500' status?.connected ? 'bg-green-500' : 'bg-red-500'
}`} }`}
/> />
<span className="text-xs text-slate-400"> <span className="text-xs font-sans text-[#444]">
{status?.connected ? 'Connected' : 'Disconnected'} {status?.connected ? 'Connected' : 'Disconnected'}
</span> </span>
</div> </div>
<div className="text-xs text-slate-500 font-mono truncate"> <div className="text-xs font-mono text-[#333] truncate">
{status?.connection_type?.toUpperCase()}: {status?.connection_target} {status?.connection_type?.toUpperCase()}: {status?.connection_target}
</div> </div>
<div className="text-xs text-slate-500 mt-1"> <div className="text-xs font-sans text-[#333] mt-1">
Uptime: {status ? formatUptime(status.uptime_seconds) : '...'} Uptime: <span className="font-mono">{status ? formatUptime(status.uptime_seconds) : '...'}</span>
</div> </div>
</div> </div>
</aside> </aside>
@ -157,7 +155,7 @@ export default function Layout({ children }: LayoutProps) {
<div className="flex-1 flex flex-col overflow-hidden"> <div className="flex-1 flex flex-col overflow-hidden">
{/* Header */} {/* Header */}
<header className="h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6"> <header className="h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6">
<h1 className="text-lg font-semibold"> <h1 className="text-lg font-sans font-semibold text-white">
{getPageTitle(location.pathname)} {getPageTitle(location.pathname)}
</h1> </h1>
<div className="flex items-center gap-6"> <div className="flex items-center gap-6">
@ -165,15 +163,15 @@ export default function Layout({ children }: LayoutProps) {
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<div <div
className={`w-2 h-2 rounded-full ${ className={`w-2 h-2 rounded-full ${
connected ? 'bg-green-500 animate-pulse-slow' : 'bg-slate-500' connected ? 'bg-accent animate-pulse-slow' : 'bg-[#333]'
}`} }`}
/> />
<span className="text-xs text-slate-400"> <span className="text-xs font-sans text-[#444]">
{connected ? 'Live' : 'Offline'} {connected ? 'Live' : 'Offline'}
</span> </span>
</div> </div>
{/* Clock */} {/* Clock */}
<div className="text-sm font-mono text-slate-400"> <div className="text-sm font-mono text-[#333]">
{timeStr} MT {timeStr} MT
</div> </div>
</div> </div>

View file

@ -6,46 +6,30 @@
@tailwind utilities; @tailwind utilities;
body { body {
background: #0a0e17; background: #111111;
margin: 0; margin: 0;
font-family: 'Inter', system-ui, -apple-system, sans-serif; font-family: 'Inter', system-ui, -apple-system, sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
/* Custom scrollbar — sharp, no radius */ /* Custom scrollbar — sharp */
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 8px; width: 8px;
height: 8px; height: 8px;
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
background: #0a0e17; background: #111111;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background: #2d3a4d; background: #1e1e1e;
border-radius: 0; border-radius: 0;
} }
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background: #3b4a5d; background: #2a2a2a;
}
/* Scanline texture on cards */
.bg-bg-card {
background-image: repeating-linear-gradient(
0deg,
transparent,
transparent 2px,
rgba(255,255,255,0.008) 2px,
rgba(255,255,255,0.008) 3px
);
}
/* Amber glow utility */
.amber-glow {
box-shadow: 0 0 12px rgba(245,158,11,0.25);
} }
/* Data values use JetBrains Mono */ /* Data values use JetBrains Mono */

View file

@ -46,7 +46,7 @@ function HealthGauge({ health }: { health: MeshHealth }) {
return ( return (
<div className="flex flex-col items-center"> <div className="flex flex-col items-center">
<svg width="140" height="140" viewBox="0 0 100 100"> <svg width="140" height="140" viewBox="0 0 100 100">
<circle cx="50" cy="50" r="45" fill="none" stroke="#1c2a3a" strokeWidth="8" /> <circle cx="50" cy="50" r="45" fill="none" stroke="#1e1e1e" strokeWidth="8" />
<circle <circle
cx="50" cy="50" r="45" fill="none" stroke="#f59e0b" strokeWidth="8" cx="50" cy="50" r="45" fill="none" stroke="#f59e0b" strokeWidth="8"
strokeLinecap="round" strokeDasharray={circumference} strokeLinecap="round" strokeDasharray={circumference}
@ -56,7 +56,7 @@ function HealthGauge({ health }: { health: MeshHealth }) {
<text x="50" y="46" textAnchor="middle" className="font-mono font-bold" style={{ fontSize: '24px', fill: '#f59e0b' }}> <text x="50" y="46" textAnchor="middle" className="font-mono font-bold" style={{ fontSize: '24px', fill: '#f59e0b' }}>
{score.toFixed(1)} {score.toFixed(1)}
</text> </text>
<text x="50" y="62" textAnchor="middle" className="font-sans" style={{ fontSize: '10px', fill: '#94a3b8' }}> <text x="50" y="62" textAnchor="middle" className="font-sans" style={{ fontSize: '10px', fill: '#444' }}>
{tier} {tier}
</text> </text>
</svg> </svg>
@ -66,18 +66,18 @@ function HealthGauge({ health }: { health: MeshHealth }) {
function PillarBar({ label, value }: { label: string; value: number }) { function PillarBar({ label, value }: { label: string; value: number }) {
const getColor = (v: number) => { const getColor = (v: number) => {
if (v > 66) return 'bg-amber' if (v > 66) return 'bg-accent'
if (v > 33) return 'bg-amber-dim' if (v > 33) return 'bg-accent-dim'
return 'bg-danger' return 'bg-red-500'
} }
return ( return (
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<div className="w-24 text-xs font-sans text-slate-400 truncate">{label}</div> <div className="w-24 text-xs font-sans text-[#444] truncate">{label}</div>
<div className="flex-1 h-2 bg-border overflow-hidden"> <div className="flex-1 h-2 bg-border overflow-hidden">
<div className={`h-full ${getColor(value)} transition-all duration-300`} style={{ width: `${value}%` }} /> <div className={`h-full ${getColor(value)} transition-all duration-300`} style={{ width: `${value}%` }} />
</div> </div>
<div className="w-12 text-right text-xs font-mono text-slate-300">{value.toFixed(1)}</div> <div className="w-12 text-right text-xs font-mono text-[#e0e0e0]">{value.toFixed(1)}</div>
</div> </div>
) )
} }
@ -88,13 +88,13 @@ function AlertItem({ alert }: { alert: Alert }) {
case 'critical': case 'critical':
case 'emergency': case 'emergency':
case 'immediate': case 'immediate':
return { bg: 'bg-danger-muted', border: 'border-danger', icon: AlertCircle, iconColor: 'text-danger' } return { bg: 'bg-red-500/5', border: 'border-red-500', icon: AlertCircle, iconColor: 'text-red-500' }
case 'warning': case 'warning':
case 'priority': case 'priority':
return { bg: 'bg-amber-muted', border: 'border-amber', icon: AlertTriangle, iconColor: 'text-amber' } return { bg: 'bg-accent/5', border: 'border-accent', icon: AlertTriangle, iconColor: 'text-accent' }
case 'routine': case 'routine':
default: default:
return { bg: 'bg-blue-muted', border: 'border-blue', icon: Info, iconColor: 'text-blue' } return { bg: 'bg-[#161616]', border: 'border-[#333]', icon: Info, iconColor: 'text-[#444]' }
} }
} }
@ -105,8 +105,8 @@ function AlertItem({ alert }: { alert: Alert }) {
<div className={`p-3 ${styles.bg} border-l-2 ${styles.border} flex items-start gap-3`}> <div className={`p-3 ${styles.bg} border-l-2 ${styles.border} flex items-start gap-3`}>
<Icon size={16} className={styles.iconColor} /> <Icon size={16} className={styles.iconColor} />
<div className="flex-1 min-w-0"> <div className="flex-1 min-w-0">
<div className="text-sm font-sans text-slate-200">{alert.message}</div> <div className="text-sm font-sans font-medium text-white">{alert.message}</div>
<div className="text-xs font-mono text-slate-500 mt-1">{alert.timestamp || 'Just now'}</div> <div className="text-[10px] font-mono text-[#333] mt-1">{alert.timestamp || 'Just now'}</div>
</div> </div>
</div> </div>
) )
@ -114,31 +114,34 @@ function AlertItem({ alert }: { alert: Alert }) {
function SourceCard({ source }: { source: SourceHealth }) { function SourceCard({ source }: { source: SourceHealth }) {
const getStatusColor = () => { const getStatusColor = () => {
if (!source.is_loaded) return 'bg-danger' if (!source.is_loaded) return 'bg-red-500'
if (source.last_error) return 'bg-amber' if (source.last_error) return 'bg-accent'
return 'bg-blue' return 'bg-green-500'
} }
return ( return (
<div className="flex items-center gap-3 p-2 bg-bg-hover"> <div className="flex items-center gap-3 p-2 bg-bg-hover">
<div className={`w-2 h-2 rounded-full ${getStatusColor()}`} /> <div className={`w-2 h-2 rounded-full ${getStatusColor()}`} />
<div className="flex-1 min-w-0"> <div className="flex-1 min-w-0">
<div className="text-sm font-sans font-medium text-slate-300 truncate">{source.name}</div> <div className="text-sm font-sans font-medium text-white truncate">{source.name}</div>
<div className="text-xs font-sans text-slate-500">{source.node_count} nodes · {source.type}</div> <div className="text-[10px] font-sans text-[#333]">{source.node_count} nodes · {source.type}</div>
</div> </div>
</div> </div>
) )
} }
function StatCard({ icon: Icon, label, value, subvalue, valueClass, subvalueClass }: { icon: typeof Radio; label: string; value: string | number; subvalue?: string; valueClass?: string; subvalueClass?: string }) { function StatCard({ icon: Icon, label, value, subvalue, accent }: { icon: typeof Radio; label: string; value: string | number; subvalue?: string; accent?: string }) {
return ( return (
<div className="bg-bg-card border border-border p-3"> <div
<div className="flex items-center gap-2 text-slate-400 mb-2"> className="bg-bg-card border border-border p-3"
<Icon size={14} /> style={accent ? { borderTopWidth: '2px', borderTopColor: accent } : undefined}
<span className="text-xs font-sans">{label}</span> >
<div className="flex items-center gap-2 mb-2">
<Icon size={14} style={{ color: accent || '#333' }} />
<span className="text-[9px] font-sans uppercase tracking-widest text-[#333]">{label}</span>
</div> </div>
<div className={`font-mono text-xl ${valueClass || 'text-amber'}`}>{value}</div> <div className="font-mono text-xl" style={{ color: accent || '#e0e0e0' }}>{value}</div>
{subvalue && <div className={`text-xs font-sans mt-1 ${subvalueClass || 'text-slate-500'}`}>{subvalue}</div>} {subvalue && <div className="text-[9px] font-sans mt-1 text-[#333]">{subvalue}</div>}
</div> </div>
) )
} }
@ -151,19 +154,19 @@ function StatCard({ icon: Icon, label, value, subvalue, valueClass, subvalueClas
function BandConditionsCard({ bandConditions }: { bandConditions: BandConditionsStatus | null }) { function BandConditionsCard({ bandConditions }: { bandConditions: BandConditionsStatus | null }) {
const getRatingColor = (rating?: string) => { const getRatingColor = (rating?: string) => {
switch (rating) { switch (rating) {
case 'Good': return 'bg-blue' case 'Good': return 'bg-green-500'
case 'Fair': return 'bg-amber-dim' case 'Fair': return 'bg-accent'
case 'Poor': return 'bg-danger' case 'Poor': return 'bg-red-500'
default: return 'bg-slate-600' default: return 'bg-[#333]'
} }
} }
const getRatingTextColor = (rating?: string) => { const getRatingTextColor = (rating?: string) => {
switch (rating) { switch (rating) {
case 'Good': return 'text-blue' case 'Good': return 'text-green-500'
case 'Fair': return 'text-amber-dim' case 'Fair': return 'text-accent'
case 'Poor': return 'text-danger' case 'Poor': return 'text-red-500'
default: return 'text-slate-500' default: return 'text-[#333]'
} }
} }
@ -175,13 +178,13 @@ function BandConditionsCard({ bandConditions }: { bandConditions: BandConditions
if (!bandConditions?.enabled || !bandConditions?.ratings) { if (!bandConditions?.enabled || !bandConditions?.ratings) {
return ( return (
<div className="bg-bg-card border border-border p-4 flex flex-col h-full"> <div className="bg-bg-card border border-border p-4 flex flex-col h-full">
<h2 className="text-sm font-sans font-medium text-slate-400 mb-3 flex items-center gap-2"> <h2 className="text-[10px] font-sans uppercase tracking-widest text-[#333] mb-3 flex items-center gap-2">
<Zap size={14} /> <Zap size={14} />
RF Propagation RF Propagation
</h2> </h2>
<div className="flex-1 flex items-center justify-center"> <div className="flex-1 flex items-center justify-center">
<div className="text-center py-8"> <div className="text-center py-8">
<div className="font-sans text-slate-400">No band conditions data</div> <div className="font-sans text-[#333]">No band conditions data</div>
</div> </div>
</div> </div>
</div> </div>
@ -192,7 +195,7 @@ function BandConditionsCard({ bandConditions }: { bandConditions: BandConditions
return ( return (
<div className="bg-bg-card border border-border p-4 flex flex-col h-full"> <div className="bg-bg-card border border-border p-4 flex flex-col h-full">
<h2 className="text-sm font-sans font-medium text-slate-400 mb-3 flex items-center gap-2"> <h2 className="text-[10px] font-sans uppercase tracking-widest text-[#333] mb-3 flex items-center gap-2">
<Zap size={14} /> <Zap size={14} />
RF Propagation RF Propagation
</h2> </h2>
@ -200,12 +203,12 @@ function BandConditionsCard({ bandConditions }: { bandConditions: BandConditions
{/* Slot label */} {/* Slot label */}
<div className="text-center mb-3"> <div className="text-center mb-3">
<span className="text-lg">{getSlotEmoji(bandConditions.slot_label)}</span> <span className="text-lg">{getSlotEmoji(bandConditions.slot_label)}</span>
<span className="text-sm font-sans text-slate-300 ml-2">{bandConditions.slot_label}</span> <span className="text-sm font-sans text-[#444] ml-2">{bandConditions.slot_label}</span>
</div> </div>
{/* Band conditions header */} {/* Band conditions header */}
<div className="text-xs font-sans text-slate-500 mb-2 flex items-center gap-1"> <div className="text-[10px] font-sans uppercase tracking-widest text-[#333] mb-2 flex items-center gap-1">
📡 Band Conditions: 📡 Band Conditions
</div> </div>
{/* Band rows */} {/* Band rows */}
@ -214,7 +217,7 @@ function BandConditionsCard({ bandConditions }: { bandConditions: BandConditions
const rating = bandConditions.ratings?.[band] const rating = bandConditions.ratings?.[band]
return ( return (
<div key={band} className="flex items-center justify-between px-2 py-1.5 bg-bg-hover"> <div key={band} className="flex items-center justify-between px-2 py-1.5 bg-bg-hover">
<span className="text-sm font-mono text-slate-300">{band}</span> <span className="text-sm font-mono text-[#444]">{band}</span>
<span className="text-sm flex items-center gap-2"> <span className="text-sm flex items-center gap-2">
<span className={`inline-block w-2 h-2 rounded-full ${getRatingColor(rating)}`} /> <span className={`inline-block w-2 h-2 rounded-full ${getRatingColor(rating)}`} />
<span className={`font-sans ${getRatingTextColor(rating)}`}>{rating || '—'}</span> <span className={`font-sans ${getRatingTextColor(rating)}`}>{rating || '—'}</span>
@ -225,7 +228,7 @@ function BandConditionsCard({ bandConditions }: { bandConditions: BandConditions
</div> </div>
{/* Footer: source and time */} {/* Footer: source and time */}
<div className="mt-auto pt-3 border-t border-border text-xs font-sans text-slate-500"> <div className="mt-auto pt-3 border-t border-border text-[10px] font-sans text-[#333]">
{bandConditions.source && ( {bandConditions.source && (
<span>{bandConditions.source === 'swpc_local' ? 'SWPC' : 'HamQSL'}</span> <span>{bandConditions.source === 'swpc_local' ? 'SWPC' : 'HamQSL'}</span>
)} )}
@ -303,16 +306,16 @@ function HepburnTropoCard() {
return ( return (
<div className="bg-bg-card border border-border p-4 flex flex-col"> <div className="bg-bg-card border border-border p-4 flex flex-col">
<div className="flex items-center justify-between mb-3"> <div className="flex items-center justify-between mb-3">
<h2 className="text-sm font-sans font-medium text-slate-400 flex items-center gap-2"> <h2 className="text-[10px] font-sans uppercase tracking-widest text-[#333] flex items-center gap-2">
<Radio size={14} /> <Radio size={14} />
Tropo Forecast (Hepburn) Tropo Forecast (Hepburn)
</h2> </h2>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
{saving && <span className="text-xs font-sans text-slate-500">saving...</span>} {saving && <span className="text-xs font-sans text-[#333]">saving...</span>}
<select <select
value={region} value={region}
onChange={e => handleRegionChange(e.target.value)} onChange={e => handleRegionChange(e.target.value)}
className="text-xs font-sans bg-bg-hover border border-border px-2 py-1 min-h-[36px] text-slate-300 focus:outline-none focus:border-amber" className="text-xs font-sans bg-bg-hover border border-border px-2 py-1 min-h-[36px] text-[#e0e0e0] focus:outline-none focus:border-accent"
> >
{TROPO_REGIONS.map(r => ( {TROPO_REGIONS.map(r => (
<option key={r.code} value={r.code}>{r.label}</option> <option key={r.code} value={r.code}>{r.label}</option>
@ -321,10 +324,10 @@ function HepburnTropoCard() {
</div> </div>
</div> </div>
<div className="text-xs font-sans text-slate-500 mb-2">{regionLabel} 6-day forecast</div> <div className="text-xs font-sans text-[#333] mb-2">{regionLabel} 6-day forecast</div>
{imgError ? ( {imgError ? (
<div className="flex items-center justify-center h-48 text-slate-500 text-sm font-sans"> <div className="flex items-center justify-center h-48 text-[#333] text-sm font-sans">
Failed to load forecast image Failed to load forecast image
</div> </div>
) : ( ) : (
@ -336,8 +339,8 @@ function HepburnTropoCard() {
/> />
)} )}
<div className="text-xs font-sans text-slate-600 mt-2"> <div className="text-[10px] font-sans text-[#333] mt-2">
Source: <a href="https://www.dxinfocentre.com/tropo.html" target="_blank" rel="noopener noreferrer" className="text-blue hover:text-blue-dim">dxinfocentre.com</a> Source: <a href="https://www.dxinfocentre.com/tropo.html" target="_blank" rel="noopener noreferrer" className="text-sky-400 hover:text-sky-300">dxinfocentre.com</a>
</div> </div>
</div> </div>
) )
@ -345,37 +348,37 @@ function HepburnTropoCard() {
// Source icon mapping // Source icon mapping
const SOURCE_ICONS: Record<string, { icon: typeof Cloud; color: string; label: string }> = { const SOURCE_ICONS: Record<string, { icon: typeof Cloud; color: string; label: string }> = {
nws: { icon: Cloud, color: 'text-blue', label: 'NWS' }, nws: { icon: Cloud, color: 'text-sky-400', label: 'NWS' },
swpc: { icon: Sun, color: 'text-amber', label: 'SWPC' }, swpc: { icon: Sun, color: 'text-accent', label: 'SWPC' },
ducting: { icon: Radio, color: 'text-blue-dim', label: 'Tropo' }, ducting: { icon: Radio, color: 'text-sky-500', label: 'Tropo' },
nifc: { icon: Flame, color: 'text-danger', label: 'NIFC' }, nifc: { icon: Flame, color: 'text-red-500', label: 'NIFC' },
firms: { icon: Satellite, color: 'text-danger-dim', label: 'FIRMS' }, firms: { icon: Satellite, color: 'text-red-400', label: 'FIRMS' },
avalanche: { icon: Mountain, color: 'text-slate-300', label: 'Avy' }, avalanche: { icon: Mountain, color: 'text-[#444]', label: 'Avy' },
usgs: { icon: Droplets, color: 'text-blue', label: 'USGS' }, usgs: { icon: Droplets, color: 'text-sky-400', label: 'USGS' },
traffic: { icon: Car, color: 'text-slate-400', label: 'Traffic' }, traffic: { icon: Car, color: 'text-[#444]', label: 'Traffic' },
roads: { icon: Construction, color: 'text-amber-dim', label: '511' }, roads: { icon: Construction, color: 'text-accent-dim', label: '511' },
} }
// Severity badge colors (3-level system + legacy support) // Severity badge colors (3-level system + legacy support)
const SEVERITY_COLORS: Record<string, string> = { const SEVERITY_COLORS: Record<string, string> = {
// New 3-level system // New 3-level system
routine: 'bg-slate-700/40 text-slate-400 border-slate-600/30', routine: 'bg-[#1e1e1e] text-[#444] border-[#222]',
priority: 'bg-amber-muted text-amber border-amber/30', priority: 'bg-accent/5 text-accent border-accent/30',
immediate: 'bg-danger-muted text-danger border-danger/30', immediate: 'bg-red-500/5 text-red-500 border-red-500/30',
// NWS native (for raw event display) // NWS native (for raw event display)
info: 'bg-blue-muted text-blue border-blue/30', info: 'bg-sky-400/10 text-sky-400 border-sky-400/30',
advisory: 'bg-blue-muted text-blue border-blue/30', advisory: 'bg-sky-400/10 text-sky-400 border-sky-400/30',
moderate: 'bg-amber-muted text-amber-dim border-amber-dim/30', moderate: 'bg-accent/5 text-accent-dim border-accent-dim/30',
watch: 'bg-amber-muted text-amber border-amber/30', watch: 'bg-accent/5 text-accent border-accent/30',
warning: 'bg-amber-muted text-amber border-amber/30', warning: 'bg-accent/5 text-accent border-accent/30',
severe: 'bg-danger-muted text-danger border-danger/30', severe: 'bg-red-500/5 text-red-500 border-red-500/30',
extreme: 'bg-danger-muted text-danger border-danger/30', extreme: 'bg-red-500/5 text-red-500 border-red-500/30',
critical: 'bg-danger-muted text-danger border-danger/30', critical: 'bg-red-500/5 text-red-500 border-red-500/30',
emergency: 'bg-danger-muted text-danger border-danger/30', emergency: 'bg-red-500/5 text-red-500 border-red-500/30',
} }
function EventFeedItem({ event, isLocal }: { event: EnvEvent; isLocal?: boolean }) { function EventFeedItem({ event, isLocal }: { event: EnvEvent; isLocal?: boolean }) {
const sourceConfig = SOURCE_ICONS[event.source] || { icon: Info, color: 'text-slate-400', label: event.source } const sourceConfig = SOURCE_ICONS[event.source] || { icon: Info, color: 'text-[#444]', label: event.source }
const Icon = sourceConfig.icon const Icon = sourceConfig.icon
const severityStyle = SEVERITY_COLORS[event.severity?.toLowerCase()] || SEVERITY_COLORS.info const severityStyle = SEVERITY_COLORS[event.severity?.toLowerCase()] || SEVERITY_COLORS.info
@ -410,24 +413,24 @@ function EventFeedItem({ event, isLocal }: { event: EnvEvent; isLocal?: boolean
const subtitle = description ? description.split('. ')[0] : null const subtitle = description ? description.split('. ')[0] : null
return ( return (
<div className={`flex items-start gap-2 py-2 border-b border-border/50 last:border-0 ${isLocal ? 'border-l-2 border-l-amber pl-2 -ml-2' : ''}`}> <div className={`flex items-start gap-2 py-2 border-b border-border/50 last:border-0 ${isLocal ? 'border-l-2 border-l-accent pl-2 -ml-2' : ''}`}>
<Icon size={14} className={`mt-0.5 flex-shrink-0 ${sourceConfig.color}`} /> <Icon size={14} className={`mt-0.5 flex-shrink-0 ${sourceConfig.color}`} />
<div className="flex-1 min-w-0"> <div className="flex-1 min-w-0">
<div className="flex items-center gap-2 mb-0.5"> <div className="flex items-center gap-2 mb-0.5">
<span className={`px-1.5 py-0.5 text-xs font-sans border ${severityStyle}`}> <span className={`px-1.5 py-0.5 text-[10px] font-sans uppercase tracking-wide border ${severityStyle}`}>
{event.severity || 'info'} {event.severity || 'info'}
</span> </span>
{isLocal && ( {isLocal && (
<span className="px-1.5 py-0.5 text-xs font-sans bg-amber-muted text-amber border border-amber/30" title="LOCAL: event coordinates fall inside the mesh's monitoring area (per the adapter's bbox config on Environment) — operators in this region are directly affected."> <span className="px-1.5 py-0.5 text-[10px] font-sans uppercase tracking-wide bg-accent/5 text-accent border border-accent/30" title="LOCAL: event coordinates fall inside the mesh's monitoring area (per the adapter's bbox config on Environment) — operators in this region are directly affected.">
LOCAL LOCAL
</span> </span>
)} )}
<span className="text-xs font-sans text-slate-500">{sourceConfig.label}</span> <span className="text-[10px] font-sans text-[#333]">{sourceConfig.label}</span>
<span className="text-xs font-mono text-slate-600 ml-auto">{formatTime(event.fetched_at)}</span> <span className="text-[10px] font-mono text-[#333] ml-auto">{formatTime(event.fetched_at)}</span>
</div> </div>
<div className={`text-sm font-sans font-medium truncate ${isLocal ? 'text-slate-100' : 'text-slate-300'}`}>{title}</div> <div className={`text-sm font-sans font-medium truncate ${isLocal ? 'text-white' : 'text-[#e0e0e0]'}`}>{title}</div>
{subtitle && ( {subtitle && (
<div className="text-xs font-sans text-slate-500 truncate mt-0.5">{subtitle}</div> <div className="text-[10px] font-sans text-[#333] truncate mt-0.5">{subtitle}</div>
)} )}
</div> </div>
</div> </div>
@ -490,20 +493,20 @@ function LiveEventFeed({ events, envStatus, embedded }: { events: EnvEvent[]; en
) : ( ) : (
<div className="flex-1 flex items-center justify-center"> <div className="flex-1 flex items-center justify-center">
<div className="text-center py-8"> <div className="text-center py-8">
<CheckCircle size={24} className="text-blue mx-auto mb-2" /> <CheckCircle size={24} className="text-green-500 mx-auto mb-2" />
<div className="font-sans text-slate-400">No active events</div> <div className="font-sans text-[#444]">No active events</div>
<div className="text-xs font-sans text-slate-500">All clear</div> <div className="text-[10px] font-sans text-[#333]">All clear</div>
</div> </div>
</div> </div>
)} )}
{/* Feed health summary */} {/* Feed health summary */}
{feedSummary && ( {feedSummary && (
<div className={`text-xs font-sans mt-3 pt-3 border-t border-border ${feedSummary.errors.length > 0 ? 'text-danger' : 'text-slate-500'}`}> <div className={`text-[10px] font-sans mt-3 pt-3 border-t border-border ${feedSummary.errors.length > 0 ? 'text-red-500' : 'text-[#333]'}`}>
<span className="font-mono">{feedSummary.active}</span> of <span className="font-mono">{feedSummary.total}</span> feeds active <span className="font-mono">{feedSummary.active}</span> of <span className="font-mono">{feedSummary.total}</span> feeds active
{feedSummary.secAgo !== null && <> · Last update <span className="font-mono">{feedSummary.secAgo}s</span> ago</>} {feedSummary.secAgo !== null && <> · Last update <span className="font-mono">{feedSummary.secAgo}s</span> ago</>}
{feedSummary.errors.length > 0 && ( {feedSummary.errors.length > 0 && (
<span className="text-danger"> · {feedSummary.errors.join(', ')}: error</span> <span className="text-red-500"> · {feedSummary.errors.join(', ')}: error</span>
)} )}
</div> </div>
)} )}
@ -514,7 +517,7 @@ function LiveEventFeed({ events, envStatus, embedded }: { events: EnvEvent[]; en
return ( return (
<div className="bg-bg-card border border-border p-4 flex flex-col h-full"> <div className="bg-bg-card border border-border p-4 flex flex-col h-full">
<h2 className="text-sm font-sans font-medium text-slate-400 mb-3 flex items-center gap-2"> <h2 className="text-[10px] font-sans uppercase tracking-widest text-[#333] mb-3 flex items-center gap-2">
<Activity size={14} /> <Activity size={14} />
Live Event Feed Live Event Feed
</h2> </h2>
@ -584,7 +587,7 @@ export default function Dashboard() {
if (loading) { if (loading) {
return ( return (
<div className="flex items-center justify-center h-64"> <div className="flex items-center justify-center h-64">
<div className="font-sans text-slate-400">Loading...</div> <div className="font-sans text-[#444]">Loading...</div>
</div> </div>
) )
} }
@ -592,7 +595,7 @@ export default function Dashboard() {
if (error) { if (error) {
return ( return (
<div className="flex items-center justify-center h-64"> <div className="flex items-center justify-center h-64">
<div className="font-sans text-danger">Error: {error}</div> <div className="font-sans text-red-500">Error: {error}</div>
</div> </div>
) )
} }
@ -603,7 +606,7 @@ export default function Dashboard() {
<div className="grid grid-cols-1 lg:grid-cols-3 gap-4"> <div className="grid grid-cols-1 lg:grid-cols-3 gap-4">
{/* Mesh Health */} {/* Mesh Health */}
<div className="bg-bg-card border border-border p-4"> <div className="bg-bg-card border border-border p-4">
<h2 className="text-sm font-sans font-medium text-slate-400 mb-3">Mesh Health</h2> <h2 className="text-[10px] font-sans uppercase tracking-widest text-[#333] mb-3">Mesh Health</h2>
{health && ( {health && (
<> <>
<HealthGauge health={health} /> <HealthGauge health={health} />
@ -625,20 +628,20 @@ export default function Dashboard() {
<div className="flex items-center gap-4 mb-3 border-b border-border"> <div className="flex items-center gap-4 mb-3 border-b border-border">
<button <button
onClick={() => setAlertTab('alerts')} onClick={() => setAlertTab('alerts')}
className={`py-2.5 -mb-px text-xs font-sans font-medium transition-colors border-b-2 ${ className={`py-2.5 -mb-px text-[10px] font-sans uppercase tracking-widest transition-colors border-b ${
alertTab === 'alerts' alertTab === 'alerts'
? 'border-amber text-slate-100' ? 'border-accent text-white'
: 'border-transparent text-slate-400 hover:text-slate-300' : 'border-transparent text-[#444]'
}`} }`}
> >
Active Alerts Active Alerts
</button> </button>
<button <button
onClick={() => setAlertTab('feed')} onClick={() => setAlertTab('feed')}
className={`py-2.5 -mb-px text-xs font-sans font-medium transition-colors border-b-2 ${ className={`py-2.5 -mb-px text-[10px] font-sans uppercase tracking-widest transition-colors border-b ${
alertTab === 'feed' alertTab === 'feed'
? 'border-amber text-slate-100' ? 'border-accent text-white'
: 'border-transparent text-slate-400 hover:text-slate-300' : 'border-transparent text-[#444]'
}`} }`}
> >
Event Feed Event Feed
@ -668,19 +671,19 @@ export default function Dashboard() {
<div className="space-y-2 max-h-48 overflow-y-auto"> <div className="space-y-2 max-h-48 overflow-y-auto">
{highSeverityEnv.map((ev, i) => { {highSeverityEnv.map((ev, i) => {
const sevStyle = ev.severity === 'immediate' const sevStyle = ev.severity === 'immediate'
? { bg: 'bg-danger-muted', border: 'border-danger', icon: AlertCircle, iconColor: 'text-danger' } ? { bg: 'bg-red-500/5', border: 'border-red-500', icon: AlertCircle, iconColor: 'text-red-500' }
: { bg: 'bg-amber-muted', border: 'border-amber', icon: AlertTriangle, iconColor: 'text-amber' } : { bg: 'bg-accent/5', border: 'border-accent', icon: AlertTriangle, iconColor: 'text-accent' }
const Icon = sevStyle.icon const Icon = sevStyle.icon
return ( return (
<div key={ev.event_id || i} className={`p-3 ${sevStyle.bg} border-l-2 ${sevStyle.border} flex items-start gap-3`}> <div key={ev.event_id || i} className={`p-3 ${sevStyle.bg} border-l-2 ${sevStyle.border} flex items-start gap-3`}>
<Icon size={16} className={sevStyle.iconColor} /> <Icon size={16} className={sevStyle.iconColor} />
<div className="flex-1 min-w-0"> <div className="flex-1 min-w-0">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<span className="px-1.5 py-0.5 text-xs font-sans bg-slate-700/40 text-slate-400 border border-slate-600/30">ENV</span> <span className="px-1.5 py-0.5 text-[10px] font-sans uppercase tracking-wide bg-[#1e1e1e] text-[#444] border border-[#222]">ENV</span>
<span className="text-xs font-sans text-slate-500">{ev.severity}</span> <span className="text-[10px] font-sans text-[#333]">{ev.severity}</span>
</div> </div>
<div className="text-sm font-sans font-medium text-slate-200 mt-1">{ev.headline}</div> <div className="text-sm font-sans font-medium text-white mt-1">{ev.headline}</div>
<div className="text-xs font-sans text-slate-500 mt-1">{ev.source} · <span className="font-mono">{new Date(ev.fetched_at * 1000).toLocaleTimeString()}</span></div> <div className="text-[10px] font-mono text-[#333] mt-1">{ev.source} · {new Date(ev.fetched_at * 1000).toLocaleTimeString()}</div>
</div> </div>
</div> </div>
) )
@ -689,8 +692,8 @@ export default function Dashboard() {
) )
} }
return ( return (
<div className="flex items-center gap-2 text-slate-500 py-4"> <div className="flex items-center gap-2 text-[#444] py-4">
<CheckCircle size={16} className="text-blue" /> <CheckCircle size={16} className="text-green-500" />
<span className="font-sans">No active alerts</span> <span className="font-sans">No active alerts</span>
</div> </div>
) )
@ -703,10 +706,10 @@ export default function Dashboard() {
{/* Quick Stats */} {/* Quick Stats */}
<div className="grid grid-cols-2 lg:grid-cols-4 gap-3"> <div className="grid grid-cols-2 lg:grid-cols-4 gap-3">
<StatCard icon={Radio} label="Nodes Online" value={health?.total_nodes || 0} subvalue={`${health?.unlocated_count || 0} unlocated`} /> <StatCard icon={Radio} label="Nodes Online" value={health?.total_nodes || 0} accent="#22c55e" subvalue={`${health?.unlocated_count || 0} unlocated`} />
<StatCard icon={Cpu} label="Infrastructure" value={`${health?.infra_online || 0}/${health?.infra_total || 0}`} valueClass="text-blue" subvalue={health?.infra_online === health?.infra_total ? 'All online' : 'Some offline'} subvalueClass={health?.infra_online === health?.infra_total ? 'text-blue-dim' : 'text-danger'} /> <StatCard icon={Cpu} label="Infrastructure" value={`${health?.infra_online || 0}/${health?.infra_total || 0}`} accent="#38bdf8" subvalue={health?.infra_online === health?.infra_total ? 'All online' : 'Some offline'} />
<StatCard icon={Activity} label="Utilization" value={`${health?.util_percent?.toFixed(1) || 0}%`} subvalue={`${health?.flagged_nodes || 0} flagged`} /> <StatCard icon={Activity} label="Utilization" value={`${health?.util_percent?.toFixed(1) || 0}%`} accent="#f59e0b" subvalue={`${health?.flagged_nodes || 0} flagged`} />
<StatCard icon={MapPin} label="Regions" value={health?.total_regions || 0} subvalue={`${health?.battery_warnings || 0} battery warnings`} /> <StatCard icon={MapPin} label="Regions" value={health?.total_regions || 0} accent="#333333" subvalue={`${health?.battery_warnings || 0} battery warnings`} />
</div> </div>
</div> </div>
</div> </div>
@ -715,7 +718,7 @@ export default function Dashboard() {
<div className="grid grid-cols-1 lg:grid-cols-3 gap-4"> <div className="grid grid-cols-1 lg:grid-cols-3 gap-4">
{/* Mesh Sources */} {/* Mesh Sources */}
<div className="bg-bg-card border border-border p-4"> <div className="bg-bg-card border border-border p-4">
<h2 className="text-sm font-sans font-medium text-slate-400 mb-3">Mesh Sources (<span className="font-mono">{sources.length}</span>)</h2> <h2 className="text-[10px] font-sans uppercase tracking-widest text-[#333] mb-3">Mesh Sources (<span className="font-mono">{sources.length}</span>)</h2>
{sources.length > 0 ? ( {sources.length > 0 ? (
<div className="space-y-1"> <div className="space-y-1">
{sources.map((source, i) => ( {sources.map((source, i) => (
@ -723,7 +726,7 @@ export default function Dashboard() {
))} ))}
</div> </div>
) : ( ) : (
<div className="font-sans text-slate-500 py-4">No sources configured</div> <div className="font-sans text-[#333] py-4">No sources configured</div>
)} )}
</div> </div>

View file

@ -17,31 +17,20 @@ export default {
extend: { extend: {
colors: { colors: {
bg: { bg: {
DEFAULT: '#0a0e17', DEFAULT: '#111111',
card: '#0f1520', card: '#0d0d0d',
hover: '#162030', hover: '#161616',
elevated: '#1a2535', elevated: '#1a1a1a',
}, },
border: { border: {
DEFAULT: '#1c2a3a', DEFAULT: '#1e1e1e',
light: '#243345', light: '#222222',
bright: '#2d4060', bright: '#2a2a2a',
}, },
amber: { accent: {
DEFAULT: '#f59e0b', DEFAULT: '#f59e0b',
dim: '#d97706', dim: '#d97706',
glow: '#fbbf24', muted: 'rgba(245,158,11,0.12)',
muted: 'rgba(245,158,11,0.15)',
},
blue: {
DEFAULT: '#38bdf8',
dim: '#0ea5e9',
muted: 'rgba(56,189,248,0.12)',
},
danger: {
DEFAULT: '#f97316',
dim: '#ea580c',
muted: 'rgba(249,115,22,0.15)',
}, },
slate: { slate: {
100: '#f1f5f9', 100: '#f1f5f9',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -8,8 +8,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
<script type="module" crossorigin src="/assets/index-Brbc1E6E.js"></script> <script type="module" crossorigin src="/assets/index-B6zGwxmY.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DSQXC5BZ.css"> <link rel="stylesheet" crossorigin href="/assets/index-DqWqopB2.css">
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>