feat(ui): port dashboard components to react

This commit is contained in:
vince 2026-06-19 23:41:19 +02:00
parent a71d66b1b8
commit 73abcc1b69
33 changed files with 1304 additions and 182 deletions

View file

@ -0,0 +1,399 @@
.dashboard-frame {
display: grid;
box-sizing: border-box;
height: 100vh;
min-height: 100vh;
gap: 0.36rem;
grid-template-rows: auto auto minmax(0, 1fr) auto;
overflow: hidden;
padding: clamp(0.42rem, 0.65vw, 0.62rem);
background:
linear-gradient(90deg, transparent 0 49%, rgba(255, 255, 255, 0.08) 50%, transparent 51%),
rgba(0, 0, 0, 0.18);
}
.dashboard-frame__header,
.dashboard-header {
display: grid;
gap: 0.5rem;
align-items: start;
border-bottom: var(--ui-border);
}
.dashboard-frame__header {
grid-template-columns: minmax(30rem, 1fr) minmax(30rem, 0.9fr);
min-height: 5.35rem;
padding-bottom: 0.34rem;
}
.dashboard-header {
grid-template-columns: minmax(0, 1fr) auto;
padding: var(--ui-space-3);
}
.dashboard-frame__header p,
.dashboard-frame__header span,
.dashboard-header p,
.dashboard-header span,
.dashboard-frame h1,
.dashboard-header h1 {
margin: 0;
text-transform: uppercase;
}
.dashboard-frame__header p,
.dashboard-frame__header span,
.dashboard-header p,
.dashboard-header span {
color: var(--ui-color-muted);
font-size: 0.78rem;
font-weight: 800;
}
.dashboard-frame h1,
.dashboard-header h1 {
max-width: 100%;
overflow-wrap: anywhere;
font-family: var(--ui-font-display);
font-size: clamp(2.2rem, 3.3vw, 2.95rem);
font-weight: 850;
letter-spacing: 0;
line-height: 0.8;
white-space: nowrap;
}
.dashboard-frame__modules {
display: grid;
grid-template-columns: minmax(15rem, 0.66fr) minmax(17rem, 1fr);
justify-content: end;
gap: 0.5rem;
}
.dashboard-frame__panels {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
align-content: start;
gap: 0.36rem;
min-height: 0;
overflow: hidden;
}
.dashboard-frame__panels .service-panel[data-layout="grid"] {
grid-column: 1 / -1;
}
.dashboard-frame__panels .service-panel[data-layout="grid"] .panel__body {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
.telemetry-grid {
display: grid;
grid-template-columns: repeat(8, minmax(0, 1fr));
gap: 1px;
border: var(--ui-border);
background: var(--ui-color-line);
}
.telemetry-card,
.module-card,
.panel,
.system-state {
border: var(--ui-border);
background: rgba(3, 4, 3, 0.86);
color: var(--ui-color-text);
}
.telemetry-card {
display: grid;
min-height: 5.15rem;
gap: 0.25rem;
padding: 0.45rem 0.55rem 0.42rem;
}
.telemetry-card header {
display: flex;
min-width: 0;
align-items: center;
gap: 0.35rem;
}
.telemetry-card h3,
.telemetry-card p,
.module-card h2,
.module-card p,
.service-row h3,
.service-row p,
.panel h2,
.system-state h2,
.system-state p {
margin: 0;
}
.telemetry-card h3,
.service-row h3 {
overflow: hidden;
font-size: 0.62rem;
font-weight: 850;
letter-spacing: 0;
line-height: 1.05;
text-overflow: ellipsis;
text-transform: uppercase;
white-space: nowrap;
}
.telemetry-card strong,
.module-card strong {
display: block;
font-family: var(--ui-font-display);
font-size: clamp(1.55rem, 2.45vw, 2.22rem);
font-weight: 800;
letter-spacing: 0;
line-height: 0.76;
white-space: nowrap;
}
.telemetry-card p,
.module-card p,
.service-row p {
overflow: hidden;
color: var(--ui-color-muted);
font-size: 0.52rem;
line-height: 1.08;
text-overflow: ellipsis;
text-transform: uppercase;
white-space: nowrap;
}
.telemetry-card__bar,
.progress-meter {
height: 0.25rem;
border: var(--ui-border);
background: #030403;
}
.telemetry-card__bar span,
.progress-meter span {
display: block;
width: var(--metric-progress, var(--meter-progress));
height: 100%;
background: currentColor;
}
.line-chart {
position: relative;
min-width: 0;
height: 1rem;
color: var(--ui-color-accent);
}
.line-chart__canvas {
width: 100%;
height: 100%;
}
.module-card {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 0.5rem;
align-items: start;
min-width: 0;
min-height: 4.15rem;
padding: 0.5rem;
}
.module-card h2 {
color: var(--ui-color-muted);
font-size: 0.56rem;
line-height: 1;
text-transform: uppercase;
}
.service-row {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
gap: 0.24rem;
align-items: center;
min-height: 2.02rem;
border: 0;
border-bottom: var(--ui-border);
background: transparent;
color: inherit;
padding: 0.14rem 0;
text-decoration: none;
}
.service-row__main {
min-width: 0;
}
.status-badge {
display: inline-grid;
min-height: 1.12rem;
align-items: center;
border: var(--ui-border);
padding: 0 0.3rem;
color: var(--ui-color-muted);
font-size: 0.55rem;
font-weight: 800;
letter-spacing: 0;
text-transform: uppercase;
white-space: nowrap;
}
.footer-cell {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
min-height: 1.9rem;
align-items: center;
background: rgba(2, 3, 2, 0.92);
color: inherit;
text-decoration: none;
}
.footer-cell span,
.footer-cell strong {
min-width: 0;
padding: 0.34rem 0.52rem;
overflow-wrap: anywhere;
text-transform: uppercase;
}
.status-strip {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
gap: 1px;
border: var(--ui-border);
background: var(--ui-color-line);
}
.panel {
position: relative;
min-width: 0;
box-shadow: var(--ui-shadow-hard);
}
.panel__header {
padding: 0.42rem 0.55rem 0;
}
.panel__body {
display: grid;
gap: 0.25rem;
padding: 0.42rem 0.55rem 0.55rem;
}
.service-panel .panel__body {
gap: 0;
padding-block: 0.24rem 0.42rem;
}
.ui-button,
.icon-button {
display: inline-grid;
align-items: center;
justify-content: center;
border: var(--ui-border);
cursor: pointer;
}
.ui-button {
grid-auto-flow: column;
gap: var(--ui-space-2);
min-height: 2.5rem;
background: var(--ui-color-accent);
color: var(--ui-color-canvas);
font-size: 0.76rem;
font-weight: 850;
padding: 0 var(--ui-space-4);
text-transform: uppercase;
}
.icon-button {
width: 2.5rem;
height: 2.5rem;
place-items: center;
background: rgba(2, 3, 2, 0.92);
color: var(--ui-color-muted);
padding: 0;
}
.icon-glyph {
display: inline-grid;
width: 1.55rem;
height: 1.55rem;
place-items: center;
border: var(--ui-border);
background: #050605;
color: currentColor;
line-height: 1;
}
.icon-glyph svg {
width: 0.95rem;
height: 0.95rem;
}
.system-state {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
gap: var(--ui-space-3);
align-items: center;
padding: var(--ui-space-4);
}
.grid-frame {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
gap: var(--ui-space-3);
padding: var(--ui-space-3);
}
.separator {
background: var(--ui-color-line);
}
.separator[data-orientation="horizontal"] {
width: 100%;
height: 1px;
margin-block: var(--ui-space-3);
}
.corner-bracket-frame,
.diagonal-stripe-field,
.scanline-field,
.signal-trace {
display: block;
min-height: 3rem;
}
@media (max-width: 1100px) {
.telemetry-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
@media (max-width: 780px) {
.dashboard-frame {
height: auto;
min-height: 100vh;
overflow: visible;
}
.dashboard-frame__header,
.dashboard-header,
.dashboard-frame__modules,
.dashboard-frame__panels {
grid-template-columns: 1fr;
}
.dashboard-frame h1,
.dashboard-header h1 {
white-space: normal;
}
}
@media (max-width: 700px) {
.telemetry-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}