diff --git a/public/index.html b/public/index.html index 303514a..58820ca 100644 --- a/public/index.html +++ b/public/index.html @@ -85,7 +85,7 @@ - + diff --git a/public/packets.js b/public/packets.js index 6724e9d..bc0f4f2 100644 --- a/public/packets.js +++ b/public/packets.js @@ -1176,12 +1176,24 @@ } } + // Location: from ADVERT lat/lon, or from known node + let locationHtml = '—'; + if (decoded.lat != null && decoded.lon != null && !(decoded.lat === 0 && decoded.lon === 0)) { + locationHtml = `${decoded.lat.toFixed(5)}, ${decoded.lon.toFixed(5)} 📍map`; + if (decoded.name) locationHtml = `${escapeHtml(decoded.name)} — ${locationHtml}`; + } else if (decoded.srcPubKey || decoded.pubKey) { + // Try to look up sender node location from HopResolver's node list + const senderKey = decoded.srcPubKey || decoded.pubKey; + const senderNode = (window.HopResolver && HopResolver.ready()) ? null : null; // could look up but keep simple + } + panel.innerHTML = `