Polish GUI design
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user