[fix](trx-frontend-http): show map loading message, sync active rig marker, align recorder actions with bookmarks
- 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) <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -3850,6 +3850,7 @@ async function switchRigFromSelect(selectEl) {
|
|||||||
if (typeof setSchedulerRig === "function") setSchedulerRig(lastActiveRigId);
|
if (typeof setSchedulerRig === "function") setSchedulerRig(lastActiveRigId);
|
||||||
if (typeof setBackgroundDecodeRig === "function") setBackgroundDecodeRig(lastActiveRigId);
|
if (typeof setBackgroundDecodeRig === "function") setBackgroundDecodeRig(lastActiveRigId);
|
||||||
if (typeof bmFetch === "function") bmFetch(document.getElementById("bm-category-filter")?.value || "");
|
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
|
// Switch this session's rig and reconnect SSE to the new rig's
|
||||||
// state channel.
|
// state channel.
|
||||||
try {
|
try {
|
||||||
@@ -4450,9 +4451,15 @@ function navigateToTab(name, options = {}) {
|
|||||||
scheduleSpectrumLayout();
|
scheduleSpectrumLayout();
|
||||||
if (typeof window.loadPluginsForTab === "function") window.loadPluginsForTab(name);
|
if (typeof window.loadPluginsForTab === "function") window.loadPluginsForTab(name);
|
||||||
if (name === "map") {
|
if (name === "map") {
|
||||||
window.trx.map?.initAprsMap();
|
const loadingEl = document.getElementById("map-loading");
|
||||||
window.trx.map?.sizeAprsMapToViewport();
|
if (window.trx.map) {
|
||||||
if (window.trx.map?.aprsMap) setTimeout(() => window.trx.map.aprsMap.invalidateSize(), 50);
|
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") {
|
if (name === "statistics") {
|
||||||
window.trx.map?.scheduleStatsRender();
|
window.trx.map?.scheduleStatsRender();
|
||||||
@@ -5833,7 +5840,7 @@ function renderRecorderFiles() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let html = '<table class="recorder-table"><thead><tr><th>File</th><th>Size</th><th></th></tr></thead><tbody>';
|
let html = '<table class="recorder-table"><thead><tr><th>File</th><th>Size</th><th>Actions</th></tr></thead><tbody>';
|
||||||
for (const f of page) {
|
for (const f of page) {
|
||||||
const safeName = escapeMapHtml(f.name);
|
const safeName = escapeMapHtml(f.name);
|
||||||
const encodedName = encodeURIComponent(f.name);
|
const encodedName = encodeURIComponent(f.name);
|
||||||
|
|||||||
@@ -977,6 +977,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="tab-map" class="tab-panel" data-tab="map" style="display:none;">
|
<div id="tab-map" class="tab-panel" data-tab="map" style="display:none;">
|
||||||
|
<div id="map-loading" class="map-loading-msg">Loading map…</div>
|
||||||
<template id="tmpl-map">
|
<template id="tmpl-map">
|
||||||
<div id="map-stage">
|
<div id="map-stage">
|
||||||
<div class="map-overlay-panel">
|
<div class="map-overlay-panel">
|
||||||
|
|||||||
@@ -3428,6 +3428,8 @@
|
|||||||
function autoInitIfVisible() {
|
function autoInitIfVisible() {
|
||||||
const panel = document.getElementById("tab-map");
|
const panel = document.getElementById("tab-map");
|
||||||
if (panel && panel.style.display !== "none") {
|
if (panel && panel.style.display !== "none") {
|
||||||
|
const loadingEl = document.getElementById("map-loading");
|
||||||
|
if (loadingEl) loadingEl.style.display = "none";
|
||||||
initAprsMap();
|
initAprsMap();
|
||||||
sizeAprsMapToViewport();
|
sizeAprsMapToViewport();
|
||||||
if (aprsMap) setTimeout(() => aprsMap.invalidateSize(), 50);
|
if (aprsMap) setTimeout(() => aprsMap.invalidateSize(), 50);
|
||||||
|
|||||||
@@ -1263,7 +1263,6 @@ small { color: var(--text-muted); }
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0.2rem 0.5rem;
|
padding: 0.2rem 0.5rem;
|
||||||
height: 1.65rem;
|
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
@@ -1274,7 +1273,6 @@ small { color: var(--text-muted); }
|
|||||||
background: var(--btn-bg);
|
background: var(--btn-bg);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color 100ms ease, border-color 100ms ease, color 100ms ease, box-shadow 100ms ease;
|
|
||||||
}
|
}
|
||||||
.recorder-table .rec-file-btn:hover { background: color-mix(in srgb, var(--btn-bg) 75%, var(--accent-green)); border-color: color-mix(in srgb, var(--btn-border) 60%, var(--accent-green)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-green) 18%, transparent); }
|
.recorder-table .rec-file-btn:hover { background: color-mix(in srgb, var(--btn-bg) 75%, var(--accent-green)); border-color: color-mix(in srgb, var(--btn-border) 60%, var(--accent-green)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-green) 18%, transparent); }
|
||||||
.recorder-table .rec-file-btn:active { background: color-mix(in srgb, var(--btn-bg) 55%, var(--accent-green)); border-color: var(--accent-green); box-shadow: none; transform: translateY(1px); }
|
.recorder-table .rec-file-btn:active { background: color-mix(in srgb, var(--btn-bg) 55%, var(--accent-green)); border-color: var(--accent-green); box-shadow: none; transform: translateY(1px); }
|
||||||
@@ -1704,6 +1702,15 @@ small { color: var(--text-muted); }
|
|||||||
min-height: 0;
|
min-height: 0;
|
||||||
gap: 0.85rem;
|
gap: 0.85rem;
|
||||||
}
|
}
|
||||||
|
.map-loading-msg {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 60vh;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
#map-stage {
|
#map-stage {
|
||||||
position: relative;
|
position: relative;
|
||||||
flex: 0 1 auto;
|
flex: 0 1 auto;
|
||||||
|
|||||||
Reference in New Issue
Block a user