Polish GUI design

This commit is contained in:
Ayzen
2026-10-06 14:16:14 +03:00
parent 5bb86b7165
commit 4947d5a14e
25 changed files with 222 additions and 235 deletions
+4 -4
View File
@@ -117,7 +117,7 @@ btnNextCombo.addEventListener("click", () => changeDisplayCombo("/api/next_combo
settingsToggle.addEventListener("click", () => sidePanel.classList.toggle("collapsed"));
// The form is built ENTIRELY from the schema the server derives from the Qt widgets
// (field, group, kind, options, ranges, value, enabled). The web hardcodes nothing
// (field, label, group, kind, options, ranges, value, enabled). The web hardcodes nothing
// and shows only the active mode's fields, so it always mirrors the desktop.
const fieldInputs = {}; // field name -> { el, kind, dirty }
let formSignature = ""; // field names currently in the form (detect mode/structure change)
@@ -146,7 +146,7 @@ function makeGeometryEditor(entry) {
input.type = "number";
input.step = index === 0 ? "1" : "any";
input.required = true;
input.setAttribute("aria-label", `${entry.name} ${key}`);
input.setAttribute("aria-label", `${entry.label} ${key}`);
if (index === 0) { input.min = "0"; input.max = entry.position_count - 1; }
input.value = record[key] ?? 0;
input.disabled = entry.enabled === false;
@@ -177,7 +177,7 @@ function makeGeometryEditor(entry) {
};
el.setRecords(entry.value);
add.type = "button";
add.textContent = "Add antenna";
add.textContent = "Add Antenna";
add.addEventListener("click", () => {
if (body.rows.length >= entry.position_count) return;
const positions = new Set(Array.from(body.rows, (row) => Number(row.querySelector("input").value)));
@@ -196,7 +196,7 @@ function makeFieldRow(entry) {
row.className = "field";
if (entry.kind === "geometry") row.classList.add("geometry-field");
const label = document.createElement("label");
label.textContent = entry.kind === "geometry" ? (entry.name === "tx_geometry" ? "Tx antenna positions" : "Rx antenna positions") : entry.name;
label.textContent = entry.label;
label.htmlFor = "f_" + entry.name;
row.appendChild(label);