From 9f29876afc8a37b72952b3a85209f92f7c0ed692 Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Sat, 4 Apr 2026 13:04:42 +0200 Subject: [PATCH] [fix](trx-frontend-http): show map loading message, sync active rig marker, align recorder actions with bookmarks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Display "Loading map…" placeholder on first map tab click while map-core.js is still loading; hide it once the module initializes. - Sync receiver marker highlight when switching rigs so the map reflects the currently active rig immediately. - Add "Actions" header to recorder files table and match button sizing to bookmarks table style. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Stan Grams --- .../trx-frontend-http/assets/web/app.js | 15 +++++++++++---- .../trx-frontend-http/assets/web/index.html | 1 + .../trx-frontend-http/assets/web/map-core.js | 2 ++ .../trx-frontend-http/assets/web/style.css | 11 +++++++++-- 4 files changed, 23 insertions(+), 6 deletions(-) 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 a39a7e5..ba4d90e 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 @@ -3850,6 +3850,7 @@ async function switchRigFromSelect(selectEl) { if (typeof setSchedulerRig === "function") setSchedulerRig(lastActiveRigId); if (typeof setBackgroundDecodeRig === "function") setBackgroundDecodeRig(lastActiveRigId); if (typeof bmFetch === "function") bmFetch(document.getElementById("bm-category-filter")?.value || ""); + window.trx.map?.syncAprsReceiverMarker(); // Switch this session's rig and reconnect SSE to the new rig's // state channel. try { @@ -4450,9 +4451,15 @@ function navigateToTab(name, options = {}) { scheduleSpectrumLayout(); if (typeof window.loadPluginsForTab === "function") window.loadPluginsForTab(name); if (name === "map") { - window.trx.map?.initAprsMap(); - window.trx.map?.sizeAprsMapToViewport(); - if (window.trx.map?.aprsMap) setTimeout(() => window.trx.map.aprsMap.invalidateSize(), 50); + const loadingEl = document.getElementById("map-loading"); + if (window.trx.map) { + if (loadingEl) loadingEl.style.display = "none"; + window.trx.map.initAprsMap(); + window.trx.map.sizeAprsMapToViewport(); + if (window.trx.map.aprsMap) setTimeout(() => window.trx.map.aprsMap.invalidateSize(), 50); + } else if (loadingEl) { + loadingEl.style.display = ""; + } } if (name === "statistics") { window.trx.map?.scheduleStatsRender(); @@ -5833,7 +5840,7 @@ function renderRecorderFiles() { return; } - let html = ''; + let html = '
FileSize
'; for (const f of page) { const safeName = escapeMapHtml(f.name); const encodedName = encodeURIComponent(f.name); 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 ddd366c..77610dc 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 @@ -977,6 +977,7 @@
FileSizeActions