diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js index 3b98aaf..46c35c3 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js @@ -289,6 +289,20 @@ function render(update) { } if (typeof update.clients === "number") lastClientCount = update.clients; + // Populate About tab + if (update.server_version) { + document.getElementById("about-server-ver").textContent = `trx-server v${update.server_version}`; + } + if (update.server_callsign) { + document.getElementById("about-server-call").textContent = update.server_callsign; + } + if (update.info) { + const parts = [update.info.manufacturer, update.info.model, update.info.revision].filter(Boolean).join(" "); + if (parts) document.getElementById("about-rig-info").textContent = parts; + } + if (typeof update.clients === "number") { + document.getElementById("about-clients").textContent = update.clients; + } powerHint.textContent = readyText(); lastLocked = update.status && update.status.lock === true; lockBtn.textContent = lastLocked ? "Unlock" : "Lock"; @@ -568,6 +582,16 @@ lockBtn.addEventListener("click", async () => { } }); +// --- Tab navigation --- +document.querySelector(".tab-bar").addEventListener("click", (e) => { + const btn = e.target.closest(".tab[data-tab]"); + if (!btn) return; + document.querySelectorAll(".tab-bar .tab").forEach((t) => t.classList.remove("active")); + btn.classList.add("active"); + document.querySelectorAll(".tab-panel").forEach((p) => p.style.display = "none"); + document.getElementById(`tab-${btn.dataset.tab}`).style.display = ""; +}); + connect(); // --- Signal measurement --- diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html index 6bf6fcb..0214434 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html @@ -17,6 +17,11 @@