working prototype

This commit is contained in:
Martino Ferrari
2026-05-19 10:48:06 +02:00
parent bdcdb39d21
commit e6ab50e90e
4 changed files with 521 additions and 184 deletions
+447 -175
View File
File diff suppressed because it is too large Load Diff
+42
View File
@@ -116,6 +116,48 @@
</div>
<div id="layout-menu"></div>
<!-- ── Signal style context menu ─────────────────────────────── -->
<div id="sig-ctx-menu" style="display:none">
<div class="ctx-menu-header">Style: <span id="ctx-menu-key" class="ctx-menu-key"></span></div>
<div class="ctx-row">
<label>Color</label>
<input type="color" id="ctx-color">
</div>
<div class="ctx-row">
<label>Width</label>
<div class="ctx-btns" id="ctx-width-btns">
<button class="ctx-btn" data-w="1">1px</button>
<button class="ctx-btn active" data-w="1.5">1.5</button>
<button class="ctx-btn" data-w="2">2px</button>
<button class="ctx-btn" data-w="3">3px</button>
</div>
</div>
<div class="ctx-row">
<label>Line</label>
<div class="ctx-btns" id="ctx-dash-btns">
<button class="ctx-btn active" data-dash="solid">——</button>
<button class="ctx-btn" data-dash="dashed">╌╌</button>
<button class="ctx-btn" data-dash="dotted">·····</button>
</div>
</div>
<div class="ctx-row">
<label>Marker</label>
<div class="ctx-btns" id="ctx-marker-btns">
<button class="ctx-btn active" data-marker="none">none</button>
<button class="ctx-btn" data-marker="circle"></button>
<button class="ctx-btn" data-marker="square"></button>
<button class="ctx-btn" data-marker="cross"></button>
<button class="ctx-btn" data-marker="diamond"></button>
</div>
</div>
<div class="ctx-row">
<label>Size</label>
<input type="range" class="ctx-range" id="ctx-marker-size" min="2" max="10" value="4">
<span class="ctx-range-val" id="ctx-marker-size-val">4px</span>
</div>
</div>
<script src="/app.js"></script>
</body>
</html>
+31 -8
View File
@@ -239,19 +239,13 @@ input[type=range].trig-range::-webkit-slider-thumb {
min-height:0; position:relative; overflow:hidden;
}
.plot-card.drag-over { background:rgba(137,180,250,0.04); box-shadow:inset 0 0 0 2px var(--accent); }
/* Header: hidden by default, slides in on hover */
/* Header: always visible, part of normal card flex flow */
.plot-card-header {
position:absolute; top:0; left:0; right:0; z-index:5;
z-index:5; flex-shrink:0;
background:rgba(17,17,27,0.88); backdrop-filter:blur(6px);
border-bottom:1px solid var(--surface1);
display:flex; align-items:center; gap:5px;
padding:3px 8px; min-height:26px; overflow:hidden;
opacity:0; transform:translateY(-100%);
transition:opacity 0.12s ease, transform 0.12s ease;
pointer-events:none;
}
.plot-card:hover .plot-card-header {
opacity:1; transform:translateY(0); pointer-events:auto;
}
.plot-title {
font-size:11px; color:var(--subtext1); font-weight:600;
@@ -289,6 +283,35 @@ input[type=range].trig-range::-webkit-slider-thumb {
border:1px solid var(--mauve);
}
/* ── Signal style context menu ────────────────────────────────── */
#sig-ctx-menu {
position:fixed; z-index:300;
background:var(--mantle); border:1px solid var(--surface1); border-radius:var(--radius);
box-shadow:0 8px 24px rgba(0,0,0,0.6); padding:10px; min-width:210px;
}
.ctx-menu-header {
font-size:11px; color:var(--subtext0); margin-bottom:8px;
padding-bottom:6px; border-bottom:1px solid var(--surface0);
white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ctx-menu-key { color:var(--accent); font-weight:600; }
.ctx-row { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.ctx-row label { font-size:11px; color:var(--subtext0); width:42px; flex-shrink:0; }
.ctx-btns { display:flex; gap:3px; flex-wrap:wrap; }
.ctx-btn {
background:var(--surface0); border:1px solid var(--surface1); border-radius:4px;
color:var(--subtext1); font-size:11px; padding:2px 7px; cursor:pointer;
transition:background var(--transition),border-color var(--transition),color var(--transition);
}
.ctx-btn:hover { background:var(--surface1); border-color:var(--accent); }
.ctx-btn.active { background:var(--surface1); border-color:var(--accent); color:var(--accent); }
#ctx-color {
width:28px; height:22px; border:1px solid var(--surface1); border-radius:4px;
background:transparent; cursor:pointer; padding:1px;
}
.ctx-range { width:80px; }
.ctx-range-val { font-size:11px; color:var(--mauve); min-width:26px; }
/* ── Empty state ──────────────────────────────────────────────── */
#empty-state {
position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
+1 -1
View File
@@ -61,7 +61,7 @@ WEBUI_DIR="${REPO_ROOT}/Client/WebUI"
WEBUI_BIN="${WEBUI_DIR}/udpstreamer-webui"
if [ "${START_WEBUI}" -eq 1 ] && [ ! -x "${WEBUI_BIN}" ]; then
echo "==> Building WebUI..."
(cd "${WEBUI_DIR}" && rm udpstreamer-webui && go build -o udpstreamer-webui ./...)
(cd "${WEBUI_DIR}" && go build -o udpstreamer-webui ./...)
echo "==> WebUI build done."
fi