From a934a5389827a56728d9306bf033f9532a6c3749 Mon Sep 17 00:00:00 2001 From: Roby Date: Sun, 25 Oct 2026 09:05:17 +0100 Subject: [PATCH] feat(ui): aggiunti link a qrz.com per i nominativi nel last heard Resi cliccabili i nominativi radio nella tabella dei log. Cliccando su un callsign si apre automaticamente la relativa pagina di ricerca su QRZ.com in una nuova scheda, filtrando in automatico gli ID di rete o puramente numerici. --- static/js/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/app.js b/static/js/app.js index 08a4c4b..d2f49eb 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -738,12 +738,16 @@ async function refreshLogs() { try { const res = await fetch('/api/logs'); const logs = await res.json(); const tbody = document.getElementById('log-body'); let tableHTML = ""; let networkLogs = {}; - logs.forEach(row => { + logs.forEach(row => { const time = row[0] ? row[0].split(' ')[1] : "--:--"; const clientId = row[1]; const protocol = row[2] || "DMR"; let source = row[3] || "---"; const target = row[4] || "---"; const rawSlot = row[5]; const source_ext = row[8]; const rawRssi = row[9]; const sourceConn = row[10]; const ysfMode = row[11]; let sourceHtml = esc(source); + if (!source.includes("🌐") && /[a-zA-Z]/.test(source)) { + let cleanCall = source.split(' ')[0].trim(); + sourceHtml = `${esc(source)}`; + } if (source_ext && source_ext.trim() !== "") { sourceHtml += ` /${esc(source_ext)}`; } let slotDisplay = rawSlot && String(rawSlot).trim() !== "" && rawSlot !== "undefined" ? (protocol === "DMR" && !String(rawSlot).toUpperCase().startsWith("TS") ? `TS${rawSlot}` : rawSlot) : "---";