[feat](trx-frontend-http): move map into dedicated tab
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -2040,6 +2040,11 @@ document.querySelector(".tab-bar").addEventListener("click", (e) => {
|
|||||||
btn.classList.add("active");
|
btn.classList.add("active");
|
||||||
document.querySelectorAll(".tab-panel").forEach((p) => p.style.display = "none");
|
document.querySelectorAll(".tab-panel").forEach((p) => p.style.display = "none");
|
||||||
document.getElementById(`tab-${btn.dataset.tab}`).style.display = "";
|
document.getElementById(`tab-${btn.dataset.tab}`).style.display = "";
|
||||||
|
if (btn.dataset.tab === "map") {
|
||||||
|
initAprsMap();
|
||||||
|
sizeAprsMapToViewport();
|
||||||
|
if (aprsMap) setTimeout(() => aprsMap.invalidateSize(), 50);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// --- Auth startup sequence ---
|
// --- Auth startup sequence ---
|
||||||
@@ -2379,16 +2384,11 @@ document.querySelectorAll(".sub-tab-bar").forEach((bar) => {
|
|||||||
const parent = bar.parentElement;
|
const parent = bar.parentElement;
|
||||||
parent.querySelectorAll(".sub-tab-panel").forEach((p) => p.style.display = "none");
|
parent.querySelectorAll(".sub-tab-panel").forEach((p) => p.style.display = "none");
|
||||||
parent.querySelector(`#subtab-${btn.dataset.subtab}`).style.display = "";
|
parent.querySelector(`#subtab-${btn.dataset.subtab}`).style.display = "";
|
||||||
if (btn.dataset.subtab === "map") {
|
|
||||||
initAprsMap();
|
|
||||||
sizeAprsMapToViewport();
|
|
||||||
if (aprsMap) setTimeout(() => aprsMap.invalidateSize(), 50);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
window.addEventListener("resize", () => {
|
window.addEventListener("resize", () => {
|
||||||
const mapTab = document.getElementById("subtab-map");
|
const mapTab = document.getElementById("tab-map");
|
||||||
if (!mapTab || mapTab.style.display === "none") return;
|
if (!mapTab || mapTab.style.display === "none") return;
|
||||||
sizeAprsMapToViewport();
|
sizeAprsMapToViewport();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<div class="tab-bar-nav">
|
<div class="tab-bar-nav">
|
||||||
<button class="tab active" data-tab="main">Main</button>
|
<button class="tab active" data-tab="main">Main</button>
|
||||||
<button class="tab" data-tab="plugins">Plugins</button>
|
<button class="tab" data-tab="plugins">Plugins</button>
|
||||||
|
<button class="tab" data-tab="map">Map</button>
|
||||||
<button class="tab" data-tab="about">About</button>
|
<button class="tab" data-tab="about">About</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-bar-actions">
|
<div class="top-bar-actions">
|
||||||
@@ -237,7 +238,6 @@
|
|||||||
<button class="sub-tab" data-subtab="ft8">FT8</button>
|
<button class="sub-tab" data-subtab="ft8">FT8</button>
|
||||||
<button class="sub-tab" data-subtab="wspr">WSPR</button>
|
<button class="sub-tab" data-subtab="wspr">WSPR</button>
|
||||||
<button class="sub-tab" data-subtab="rds">RDS</button>
|
<button class="sub-tab" data-subtab="rds">RDS</button>
|
||||||
<button class="sub-tab" data-subtab="map">Map</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="subtab-overview" class="sub-tab-panel">
|
<div id="subtab-overview" class="sub-tab-panel">
|
||||||
<div class="plugin-item">
|
<div class="plugin-item">
|
||||||
@@ -284,14 +284,6 @@
|
|||||||
<div class="rds-raw-label">Raw JSON (last spectrum frame)</div>
|
<div class="rds-raw-label">Raw JSON (last spectrum frame)</div>
|
||||||
<pre id="rds-raw" class="rds-raw">--</pre>
|
<pre id="rds-raw" class="rds-raw">--</pre>
|
||||||
</div>
|
</div>
|
||||||
<div id="subtab-map" class="sub-tab-panel" style="display:none;">
|
|
||||||
<div class="map-controls">
|
|
||||||
<label><input type="checkbox" id="map-filter-aprs" checked /> APRS</label>
|
|
||||||
<label><input type="checkbox" id="map-filter-ft8" checked /> FT8</label>
|
|
||||||
<label><input type="checkbox" id="map-filter-wspr" checked /> WSPR</label>
|
|
||||||
</div>
|
|
||||||
<div id="aprs-map"></div>
|
|
||||||
</div>
|
|
||||||
<div id="subtab-aprs" class="sub-tab-panel" style="display:none;">
|
<div id="subtab-aprs" class="sub-tab-panel" style="display:none;">
|
||||||
<div class="aprs-controls">
|
<div class="aprs-controls">
|
||||||
<button id="aprs-clear-btn" type="button">Clear</button>
|
<button id="aprs-clear-btn" type="button">Clear</button>
|
||||||
@@ -348,6 +340,14 @@
|
|||||||
<div id="cw-output"></div>
|
<div id="cw-output"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="tab-map" class="tab-panel" style="display:none;">
|
||||||
|
<div class="map-controls">
|
||||||
|
<label><input type="checkbox" id="map-filter-aprs" checked /> APRS</label>
|
||||||
|
<label><input type="checkbox" id="map-filter-ft8" checked /> FT8</label>
|
||||||
|
<label><input type="checkbox" id="map-filter-wspr" checked /> WSPR</label>
|
||||||
|
</div>
|
||||||
|
<div id="aprs-map"></div>
|
||||||
|
</div>
|
||||||
<div id="tab-about" class="tab-panel" style="display:none;">
|
<div id="tab-about" class="tab-panel" style="display:none;">
|
||||||
<div id="auth-badge" style="display:none; margin-bottom: 1rem; padding: 0.5rem; background: var(--bg-secondary); border-radius: 0.25rem; color: var(--text-muted); font-size: 0.85rem;">Authenticated as: <strong id="auth-role-badge">--</strong></div>
|
<div id="auth-badge" style="display:none; margin-bottom: 1rem; padding: 0.5rem; background: var(--bg-secondary); border-radius: 0.25rem; color: var(--text-muted); font-size: 0.85rem;">Authenticated as: <strong id="auth-role-badge">--</strong></div>
|
||||||
<table class="about-table">
|
<table class="about-table">
|
||||||
|
|||||||
Reference in New Issue
Block a user