New crates:
bascule-dashboard — shared Dioxus component library
SessionTable: live active sessions with auth/backend/TPM status
StatsCards: active count, 24h total, TPM attested %, failed auth
StatusBar: connection health indicator
types.rs: DashboardSession, DashboardStats, HealthResponse
bascule-dashboard-web — WASM web target (Dioxus 0.6 + web features)
Compiles to wasm32-unknown-unknown
Dark-first CSS (light mode via prefers-color-scheme)
Monospace data display, clean stat cards
bascule-core/store.rs — in-memory session store
SessionStore with active sessions + aggregate stats
Updated via SessionHandler hooks
Both dashboard library and web WASM target compile clean.
Server and shell builds unaffected. Zero substrate deps.
Signed-off-by: Tyler King <tking@guildhouse.dev>
139 lines
3.1 KiB
CSS
139 lines
3.1 KiB
CSS
:root {
|
|
--bg-primary: #0f1117;
|
|
--bg-secondary: #1a1d27;
|
|
--bg-card: #222633;
|
|
--text-primary: #e4e7ef;
|
|
--text-secondary: #8b8fa3;
|
|
--accent-primary: #6c8cff;
|
|
--accent-success: #4caf82;
|
|
--accent-warning: #e8a838;
|
|
--accent-danger: #e85454;
|
|
--border: #2a2e3d;
|
|
--radius: 8px;
|
|
--font-mono: 'JetBrains Mono', 'Fira Code', monospace;
|
|
--font-sans: 'Inter', -apple-system, sans-serif;
|
|
}
|
|
|
|
@media (prefers-color-scheme: light) {
|
|
:root {
|
|
--bg-primary: #f8f9fc;
|
|
--bg-secondary: #ffffff;
|
|
--bg-card: #ffffff;
|
|
--text-primary: #1a1d27;
|
|
--text-secondary: #6b7280;
|
|
--border: #e5e7eb;
|
|
}
|
|
}
|
|
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
body {
|
|
font-family: var(--font-sans);
|
|
background: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.dashboard { min-height: 100vh; }
|
|
|
|
.dashboard-header {
|
|
background: var(--bg-secondary);
|
|
border-bottom: 1px solid var(--border);
|
|
padding: 12px 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.dashboard-header h1 { font-size: 1.2em; }
|
|
|
|
.dashboard-main {
|
|
padding: 24px;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.stat-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
gap: 12px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.stat-card {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 16px;
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 2em;
|
|
font-weight: 700;
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 0.8em;
|
|
color: var(--text-secondary);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.stat-primary .stat-value { color: var(--accent-primary); }
|
|
.stat-secondary .stat-value { color: var(--text-secondary); }
|
|
.stat-success .stat-value { color: var(--accent-success); }
|
|
.stat-warning .stat-value { color: var(--accent-warning); }
|
|
.stat-danger .stat-value { color: var(--accent-danger); }
|
|
|
|
.session-table { margin-top: 24px; }
|
|
.session-table h2 { margin-bottom: 12px; }
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-family: var(--font-mono);
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
th {
|
|
text-align: left;
|
|
padding: 8px 12px;
|
|
color: var(--text-secondary);
|
|
border-bottom: 1px solid var(--border);
|
|
font-weight: 500;
|
|
}
|
|
|
|
td {
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-size: 0.8em;
|
|
background: var(--bg-secondary);
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.image-tag { font-size: 0.8em; color: var(--text-secondary); }
|
|
.empty { color: var(--text-secondary); padding: 24px; text-align: center; }
|
|
|
|
.status-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
.status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.status-connected { background: var(--accent-success); }
|
|
.status-disconnected { background: var(--accent-danger); }
|
|
.status-text { color: var(--text-secondary); }
|
|
.refresh-time { color: var(--text-secondary); font-size: 0.8em; }
|