Web: link neighbour IDs to meshcoretel.ru profile pages

renderNeighbourId in the /stats neighbours table now checks for the
"full_id" field emitted by appendJsonNeighbours().  If the value is a
valid 64-character hex string (the node's full 32-byte public key),
the short ID is wrapped in an anchor tag pointing to
https://meshcoretel.ru/<FULL_ID_UPPERCASE> (target="_blank",
rel="noopener noreferrer").  Falls back to plain short ID when
"full_id" is absent or does not match the expected pattern.
Этот коммит содержится в:
Valentin V. Bartenev
2026-05-17 06:11:52 +03:00
родитель 88517878d6
Коммит 7378666416
+6 -1
Просмотреть файл
@@ -1661,7 +1661,12 @@ const char kWebPanelAppHtml[] PROGMEM = R"HTML(
}
const renderNeighbourId = (neighbour) => {
const shortId = escapeHtml(neighbour.id || "--");
return shortId;
const fullId = typeof neighbour.full_id === "string" ? neighbour.full_id.trim() : "";
if (!/^[0-9A-Fa-f]{64}$/.test(fullId)) {
return shortId;
}
const href = "https://meshcoretel.ru/" + encodeURIComponent(fullId.toUpperCase());
return `<a href="${href}" target="_blank" rel="noopener noreferrer">${shortId}</a>`;
};
const rows = neighbours.map((neighbour) => `<tr>
<td>${renderNeighbourId(neighbour)}</td>