[feat](trx-frontend-http): show receiver/locator on map panel stat cards

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-26 18:36:08 +01:00
parent 7b07feb725
commit ab0003b08d
2 changed files with 46 additions and 0 deletions
@@ -6713,6 +6713,7 @@ function rebuildDecodeContactPaths() {
sourceType: entry.sourceType,
tsMs,
bandLabel: band?.label || null,
remote: detail?.remote || null,
});
}
}
@@ -6743,11 +6744,23 @@ function rebuildDecodeContactPaths() {
distanceText: formatDecodeContactDistance(distanceKm),
line: null,
labelMarker: null,
remote: msg.remote,
});
}
syncDecodeContactPathVisibility();
}
function _receiverLabel(rigId) {
if (!rigId) return null;
const rig = serverRigs.find(r => r.remote === rigId);
const name = lastRigDisplayNames[rigId] || rigId;
if (rig && rig.latitude != null && rig.longitude != null) {
const grid = latLonToMaidenhead(rig.latitude, rig.longitude);
return `${name} (${grid})`;
}
return name;
}
function renderMapQsoSummary() {
const listEl = document.getElementById("map-qso-summary-list");
if (!listEl) return;
@@ -6835,6 +6848,14 @@ function renderMapQsoSummary() {
meta.appendChild(age);
}
const rxLabel = _receiverLabel(entry.remote);
if (rxLabel) {
const rx = document.createElement("span");
rx.className = "map-qso-card-pill map-qso-card-rx";
rx.textContent = rxLabel;
meta.appendChild(rx);
}
body.appendChild(meta);
const grids = document.createElement("div");
@@ -6873,6 +6894,7 @@ function renderMapSignalSummary() {
grid: entry.grid,
sourceType: entry.sourceType,
bandLabel: bandForHz(Number(detail?.freq_hz))?.label || null,
remote: detail?.remote || null,
});
}
}
@@ -6950,6 +6972,14 @@ function renderMapSignalSummary() {
meta.appendChild(age);
}
const rxLabel = _receiverLabel(entry.remote);
if (rxLabel) {
const rx = document.createElement("span");
rx.className = "map-qso-card-pill map-qso-card-rx";
rx.textContent = rxLabel;
meta.appendChild(rx);
}
body.appendChild(meta);
const grids = document.createElement("div");
@@ -6987,6 +7017,7 @@ function renderMapWeakSignalSummary() {
grid: entry.grid,
sourceType: entry.sourceType,
bandLabel: bandForHz(Number(detail?.freq_hz))?.label || null,
remote: detail?.remote || null,
});
}
}
@@ -7064,6 +7095,14 @@ function renderMapWeakSignalSummary() {
meta.appendChild(age);
}
const rxLabel = _receiverLabel(entry.remote);
if (rxLabel) {
const rx = document.createElement("span");
rx.className = "map-qso-card-pill map-qso-card-rx";
rx.textContent = rxLabel;
meta.appendChild(rx);
}
body.appendChild(meta);
const grids = document.createElement("div");