[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:
@@ -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");
|
||||
|
||||
@@ -1623,6 +1623,13 @@ button.map-qso-card:focus-visible {
|
||||
border-color: color-mix(in srgb, var(--band-color, var(--accent-green)) 40%, transparent);
|
||||
background: color-mix(in srgb, var(--band-color, var(--accent-green)) 14%, transparent);
|
||||
}
|
||||
.map-qso-card-rx {
|
||||
text-transform: none;
|
||||
font-weight: 600;
|
||||
color: var(--text-muted);
|
||||
border-color: color-mix(in srgb, var(--accent-blue, #5b9bd5) 35%, transparent);
|
||||
background: color-mix(in srgb, var(--accent-blue, #5b9bd5) 10%, transparent);
|
||||
}
|
||||
.map-overlay-panel {
|
||||
position: absolute;
|
||||
right: 0.7rem;
|
||||
|
||||
Reference in New Issue
Block a user