[fix](trx-frontend-http): show trx-client version in header, remove version info from footer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-24 21:08:41 +01:00
parent 68449425be
commit a00b1d216a
2 changed files with 8 additions and 26 deletions
@@ -2522,13 +2522,6 @@ let signalSplitPercent = clampSignalSplitPercent(
Number(loadSetting("signalSplitPercent", DEFAULT_SIGNAL_SPLIT_PERCENT)),
);
function updateFooterBuildInfo() {
const serverEl = document.getElementById("footer-server-build");
if (!serverEl) return;
const ver = serverVersion || "--";
const build = serverBuildDate || "--";
serverEl.textContent = `trx-server v${ver} ${build}`;
}
function scheduleSpectrumLayout() {
if (spectrumLayoutPending) return;
@@ -2821,7 +2814,6 @@ function render(update) {
}
scheduleSpectrumLayout();
updateTitle();
updateFooterBuildInfo();
initialized = !!update.initialized;
const hasUsableSnapshot =
@@ -2852,21 +2844,13 @@ function render(update) {
loadingEl.style.display = "none";
if (contentEl) contentEl.style.display = "";
}
// Server subtitle: "trx-server vX.Y.Z hosted by CALL"
if (serverSubtitle) {
if (update.server_version && update.server_callsign) {
const safeCallsign = escapeMapHtml(update.server_callsign);
const encodedCallsign = encodeURIComponent(update.server_callsign);
serverSubtitle.innerHTML =
`trx-server v${update.server_version} hosted by <a href="https://qrzcq.com/call/${encodedCallsign}" target="_blank" rel="noopener">${safeCallsign}</a>`;
} else if (update.server_version) {
serverSubtitle.textContent = `trx-server v${update.server_version}`;
} else if (update.server_callsign) {
const safeCallsign = escapeMapHtml(update.server_callsign);
const encodedCallsign = encodeURIComponent(update.server_callsign);
serverSubtitle.innerHTML =
`trx-server hosted by <a href="https://qrzcq.com/call/${encodedCallsign}" target="_blank" rel="noopener">${safeCallsign}</a>`;
}
// Server subtitle: keep the static "trx-client vX.Y.Z" and append callsign if available.
if (serverSubtitle && update.server_callsign) {
const base = serverSubtitle.textContent.split(" hosted by")[0];
const safeCallsign = escapeMapHtml(update.server_callsign);
const encodedCallsign = encodeURIComponent(update.server_callsign);
serverSubtitle.innerHTML =
`${escapeMapHtml(base)} hosted by <a href="https://qrzcq.com/call/${encodedCallsign}" target="_blank" rel="noopener">${safeCallsign}</a>`;
}
// Note: rig switch decoder reset is now handled in switchRigFromSelect()
// so that other tabs' switches don't reset our state.
@@ -25,7 +25,7 @@
</div>
<div class="header-text">
<div class="title"><span id="rig-title">trx-rs</span></div>
<div class="subtitle" id="server-subtitle"></div>
<div class="subtitle" id="server-subtitle">trx-client v{ver}</div>
<div class="subtitle" id="rig-subtitle" style="font-weight: 700;">Rig: --</div>
<div class="subtitle" id="location-subtitle" style="display:none;"></div>
</div>
@@ -1036,8 +1036,6 @@
<div class="footer">
<div class="copyright">
Built by <a href="https://www.qrzcq.com/call/SP2SJG" target="_blank" rel="noopener">SP2SJG</a> from <a href="https://haxx.space" target="_blank" rel="noopener">haxx.space</a> · <span class="gh-link-wrap"><a class="gh-link" href="https://github.com/sgrams/trx-rs" target="_blank" rel="noopener" aria-label="Open trx-rs on GitHub"><svg class="gh-link-icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 0.2a8 8 0 0 0-2.53 15.59c0.4 0.07 0.55-0.17 0.55-0.39l-0.01-1.37c-2.23 0.49-2.7-0.95-2.7-0.95-0.36-0.91-0.89-1.15-0.89-1.15-0.73-0.49 0.06-0.48 0.06-0.48 0.8 0.06 1.22 0.82 1.22 0.82 0.72 1.22 1.88 0.87 2.34 0.67 0.07-0.51 0.28-0.86 0.5-1.06-1.78-0.2-3.64-0.89-3.64-3.95 0-0.87 0.31-1.58 0.81-2.14-0.08-0.2-0.35-1.02 0.08-2.12 0 0 0.67-0.21 2.2 0.82a7.56 7.56 0 0 1 4.01 0c1.53-1.03 2.2-0.82 2.2-0.82 0.43 1.1 0.16 1.92 0.08 2.12 0.51 0.56 0.81 1.27 0.81 2.14 0 3.07-1.87 3.75-3.66 3.95 0.29 0.25 0.54 0.73 0.54 1.48l-0.01 2.2c0 0.22 0.14 0.47 0.55 0.39A8 8 0 0 0 8 0.2Z"></path></svg><span>trx-rs on GitHub</span></a></span><span id="copyright-year"></span>
- <span id="footer-server-build">trx-server v-- --</span>
- <span id="footer-client-build">trx-client v{ver} {client_build_date}</span>
</div>
<div class="hint" id="power-hint">Connecting…</div>
</div>