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 73830dd..0e27f74 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
@@ -3282,13 +3282,14 @@ function renderMapLocatorChipRow(container, items, selectedSet, kind) {
container.innerHTML = `No ${kind === "band" ? "bands" : "sources"} available`;
return;
}
+ let helperText = "";
if (kind === "source") {
const allVisible = items.every((item) => mapFilter[item.key]);
if (allVisible) {
- container.innerHTML = 'All sources visible by default';
+ helperText = "All sources visible by default";
}
} else if (!(selectedSet instanceof Set) || selectedSet.size === 0) {
- container.innerHTML = `All ${kind === "band" ? "bands" : "sources"} visible by default`;
+ helperText = `All ${kind === "band" ? "bands" : "sources"} visible by default`;
}
for (const item of items) {
const btn = document.createElement("button");
@@ -3304,6 +3305,12 @@ function renderMapLocatorChipRow(container, items, selectedSet, kind) {
: `${escapeMapHtml(item.label)}`;
container.appendChild(btn);
}
+ if (helperText) {
+ const hint = document.createElement("span");
+ hint.className = "map-locator-empty";
+ hint.textContent = helperText;
+ container.appendChild(hint);
+ }
}
function renderMapLocatorPhaseRow(container, phase) {
@@ -3330,10 +3337,20 @@ function rebuildMapLocatorFilters() {
const choiceLabelEl = document.getElementById("map-locator-choice-label");
if (!phaseEl || !choiceEl || !choiceLabelEl) return;
+ const availableSources = new Set();
+ if (aisMarkers.size > 0) availableSources.add("ais");
+ if (vdesMarkers.size > 0) availableSources.add("vdes");
+ for (const entry of stationMarkers.values()) {
+ if (entry?.type === "aprs" && (entry.marker || (entry.lat != null && entry.lon != null))) {
+ availableSources.add("aprs");
+ break;
+ }
+ }
const bandMap = new Map();
for (const entry of locatorMarkers.values()) {
const sourceType = entry?.sourceType;
if (!sourceType) continue;
+ availableSources.add(sourceType);
const meta = entry?.bandMeta instanceof Map ? entry.bandMeta : new Map();
for (const [label, hz] of meta.entries()) {
if (!bandMap.has(label)) {
@@ -3360,12 +3377,14 @@ function rebuildMapLocatorFilters() {
if (!bandMap.has(key)) mapLocatorFilter.bands.delete(key);
}
- const sourceItems = ["ais", "vdes", "aprs", "bookmark", "ft8", "wspr"].map((key) => ({
- key,
- label: mapSourceLabel(key),
- color: mapSourceColor(key),
- kind: "source",
- }));
+ const sourceItems = ["ais", "vdes", "aprs", "bookmark", "ft8", "wspr"]
+ .filter((key) => availableSources.has(key))
+ .map((key) => ({
+ key,
+ label: mapSourceLabel(key),
+ color: mapSourceColor(key),
+ kind: "source",
+ }));
const bandItems = Array.from(bandMap.values())
.sort((a, b) => (b.sortHz - a.sortHz) || a.label.localeCompare(b.label));
diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css
index 37756cc..b7d18fe 100644
--- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css
+++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css
@@ -1552,8 +1552,6 @@ small { color: var(--text-muted); }
flex-direction: column;
gap: 0.3rem;
margin-bottom: 0.55rem;
- padding-top: 0.15rem;
- border-top: 1px solid color-mix(in srgb, var(--border) 86%, transparent);
}
.map-locator-filter-group {
display: flex;