From d48a7e7ab525918e32dc2081abd435227c5046dd Mon Sep 17 00:00:00 2001 From: you Date: Sat, 21 Mar 2026 00:36:39 +0000 Subject: [PATCH] feat: show hash prefix in node popup (bold, with byte size) --- public/index.html | 2 +- public/map.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 5d0ecc0..6e8bb59 100644 --- a/public/index.html +++ b/public/index.html @@ -83,7 +83,7 @@ - + diff --git a/public/map.js b/public/map.js index 5c2c31c..19e1452 100644 --- a/public/map.js +++ b/public/map.js @@ -509,12 +509,17 @@ const loc = (node.lat && node.lon) ? `${node.lat.toFixed(5)}, ${node.lon.toFixed(5)}` : '—'; const lastAdvert = node.last_seen ? timeAgo(node.last_seen) : '—'; const roleBadge = `${(node.role || 'unknown').toUpperCase()}`; + const hs = node.hash_size || 1; + const hashPrefix = node.public_key ? node.public_key.slice(0, hs * 2).toUpperCase() : '—'; + const hashPrefixRow = `
Hash Prefix
+
${safeEsc(hashPrefix)} (${hs}B)
`; return `

${safeEsc(node.name || 'Unknown')}

${roleBadge}
+ ${hashPrefixRow}
Key
${safeEsc(key)}
Location