// Reflector Dashboard — web front-end for SvxReflector // Copyright (C) 2026 SA7AUX (Björn) // SPDX-License-Identifier: AGPL-3.0-or-later // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Affero General Public License as published by the Free // Software Foundation, either version 3 of the License, or (at your option) any // later version. See the LICENSE file for details. 'use strict'; function updateTalkerPopup(nodes, talkerMeta){ const popup = document.getElementById('talkerPopup'); const title = document.getElementById('talkerTitle'); const body = document.getElementById('talkerBody'); const calls = Object.keys(nodes || {}); const talkers = calls .map(cs => ({ cs, n: nodes[cs] || {} })) .filter(x => x.n.isTalker === true && Number(x.n.tg || 0) !== 0); if (talkers.length === 0) { popup.style.display = 'none'; body.innerHTML = ''; return; } title.textContent = `Talking now: ${talkers.length}`; const lines = talkers.map(t => { const tg = Number(t.n.tg || 0); const nodeType = t.n.nodeClass || 'node'; const listeners = calls.filter(cs2 => includesTG(nodes[cs2], tg)).length; const sysop = (t.n.sysop && t.n.sysop !== t.cs) ? ` (${t.n.sysop})` : ''; // Bridge talker meta (via-gated): show the real talker behind the node const m = (talkerMeta || {})[String(tg)]; const who = (m && m.callsign && (!m.via || m.via === t.cs)) ? `${m.callsign} via ${t.cs}` : `${t.cs}${sysop}`; return `