Improved UI

This commit is contained in:
Martino Ferrari
2026-05-06 15:55:45 +02:00
parent 0a5a85e4c4
commit 912ecdd9ed
19 changed files with 1141 additions and 279 deletions
+201 -9
View File
@@ -5,6 +5,10 @@
padding: 0;
}
html {
font-size: clamp(13px, 1.5vh, 18px);
}
body {
background: #0f1117;
color: #e2e8f0;
@@ -52,7 +56,7 @@ body {
align-items: center;
justify-content: space-between;
padding: 0 1rem;
height: 44px;
height: 2.75rem;
background: #1a1f2e;
border-bottom: 1px solid #2d3748;
flex-shrink: 0;
@@ -167,6 +171,22 @@ body {
min-height: 0;
}
/* ── Panel resize handle ─────────────────────────────────────────────────── */
.panel-resize-handle {
width: 5px;
flex-shrink: 0;
background: transparent;
cursor: ew-resize;
position: relative;
z-index: 10;
transition: background 0.15s;
}
.panel-resize-handle:hover,
.panel-resize-handle.dragging {
background: #4a9eff55;
}
/* ── EditMode ──────────────────────────────────────────────────────────── */
.edit-mode {
@@ -204,7 +224,7 @@ body {
justify-content: space-between;
padding: 0.5rem 0.5rem 0.5rem 0.75rem;
border-bottom: 1px solid #2d3748;
min-height: 40px;
min-height: 2.5rem;
flex-shrink: 0;
}
@@ -472,7 +492,6 @@ body {
.gauge-svg {
width: 100%;
flex: 1;
overflow: visible;
}
.gauge-value {
@@ -776,6 +795,12 @@ body {
border-color: #4a9eff;
}
.sv-select {
flex: 1;
width: auto;
cursor: pointer;
}
.sv-current {
font-family: ui-monospace, monospace;
font-size: 0.85rem;
@@ -914,7 +939,7 @@ body {
}
.chart-area {
overflow: hidden;
overflow: visible;
}
/* uPlot dark overrides */
@@ -1301,9 +1326,13 @@ body {
background: #1e2535;
border: 1px solid #2d3748;
border-radius: 8px;
width: 420px;
width: min(600px, 92vw);
min-width: 380px;
min-height: 440px;
max-width: 95vw;
max-height: 90vh;
max-height: 92vh;
resize: both;
overflow: hidden;
display: flex;
flex-direction: column;
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
@@ -1374,6 +1403,68 @@ body {
/* ── Synthetic Editor ────────────────────────────────────────────────────── */
/* ── Lua editor ────────────────────────────────────────────────────────────── */
.lua-editor {
position: relative;
border: 1px solid #3d4f6e;
border-radius: 4px;
overflow: hidden;
background: #0a0d14;
font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
font-size: 12px;
line-height: 1.5;
min-height: 6em;
}
.lua-pre,
.lua-textarea {
position: absolute;
inset: 0;
margin: 0;
padding: 6px 8px;
border: none;
outline: none;
overflow: auto;
white-space: pre-wrap;
word-wrap: break-word;
tab-size: 2;
font: inherit;
box-sizing: border-box;
}
.lua-pre {
color: #e2e8f0;
pointer-events: none;
z-index: 0;
overflow: hidden;
}
.lua-textarea {
color: transparent;
caret-color: #e2e8f0;
background: transparent;
resize: none;
z-index: 1;
width: 100%;
height: 100%;
}
.lua-textarea:focus {
outline: none;
box-shadow: inset 0 0 0 1px #4a9eff;
}
/* Syntax token colours */
.lua-kw { color: #c792ea; font-weight: 600; }
.lua-str { color: #c3e88d; }
.lua-cmt { color: #546e7a; font-style: italic; }
.lua-num { color: #f78c6c; }
/* wizard is already wide enough and resizable — no extra :has() rule needed */
/* ── Synthetic pipeline ─────────────────────────────────────────────────────── */
.synth-pipeline-node {
background: #1a2234;
border: 1px solid #2d3748;
@@ -2170,7 +2261,7 @@ kbd {
align-items: center;
gap: 2px;
padding: 0 0.5rem;
height: 36px;
height: 2.25rem;
background: #0f1117;
border-bottom: 1px solid #1e293b;
flex-shrink: 0;
@@ -2312,7 +2403,7 @@ kbd {
align-items: center;
gap: 0.5rem;
padding: 0 0.75rem;
height: 40px;
height: 2.5rem;
background: #0f1117;
border-bottom: 1px solid #1e293b;
flex-shrink: 0;
@@ -2350,7 +2441,11 @@ kbd {
}
.plot-panel-content {
display: contents;
display: flex;
flex: 1;
min-width: 0;
min-height: 0;
overflow: hidden;
}
.plot-panel-legend {
@@ -2394,6 +2489,21 @@ kbd {
white-space: nowrap;
}
.plot-legend-icon-btn {
background: none;
border: none;
color: #475569;
cursor: pointer;
font-size: 0.75rem;
padding: 0 0.15rem;
line-height: 1;
opacity: 0.6;
border-radius: 3px;
}
.plot-legend-icon-btn:hover { opacity: 1; color: #94a3b8; }
.plot-legend-icon-btn.active { opacity: 1; color: #4a9eff; }
/* kept for back-compat — remove button is now .plot-legend-icon-btn */
.plot-legend-rm {
background: none;
border: none;
@@ -2405,6 +2515,60 @@ kbd {
}
.plot-legend-rm:hover { opacity: 1; color: #f87171; }
/* ── Per-signal style editor ────────────────────────────────────────────── */
.plot-style-editor {
margin-top: 0.4rem;
padding-top: 0.4rem;
border-top: 1px solid #1e293b;
display: flex;
flex-direction: column;
gap: 0.3rem;
}
.plot-style-row {
display: flex;
align-items: center;
gap: 0.4rem;
}
.plot-style-label {
font-size: 0.68rem;
color: #64748b;
width: 2.8rem;
flex-shrink: 0;
}
.plot-style-color {
width: 28px;
height: 20px;
border: 1px solid #2d3748;
border-radius: 3px;
padding: 0;
cursor: pointer;
background: none;
}
.plot-style-btns {
display: flex;
gap: 2px;
}
.plot-style-btn {
background: #1e293b;
border: 1px solid #2d3748;
color: #64748b;
cursor: pointer;
font-size: 0.68rem;
padding: 1px 5px;
border-radius: 3px;
line-height: 1.4;
min-width: 1.6rem;
text-align: center;
}
.plot-style-btn:hover { color: #cbd5e1; border-color: #475569; }
.plot-style-btn.active { background: #1e3a5f; border-color: #4a9eff; color: #e2e8f0; }
.plot-stats-tbl {
width: 100%;
border-collapse: collapse;
@@ -2437,3 +2601,31 @@ kbd {
width: 100% !important;
height: 100% !important;
}
/* ── Zoom control ─────────────────────────────────────────────────────────── */
.zoom-control {
display: flex;
align-items: center;
gap: 2px;
}
.zoom-btn {
background: #1e293b;
border: 1px solid #2d3748;
color: #94a3b8;
cursor: pointer;
font-size: 0.75rem;
padding: 2px 7px;
border-radius: 4px;
line-height: 1.4;
}
.zoom-btn:hover { color: #e2e8f0; border-color: #475569; background: #273244; }
.zoom-pct {
font-size: 0.72rem;
color: #64748b;
width: 2.8rem;
text-align: center;
font-variant-numeric: tabular-nums;
}