From ab130a88c87ede4e89eb173f0ebc918bb2f8325f Mon Sep 17 00:00:00 2001 From: drjones Date: Sat, 20 Jun 2026 15:22:35 -0700 Subject: [PATCH] =?UTF-8?q?fix=20vectors=20panel=20not=20loading=20?= =?UTF-8?q?=E2=80=94=20onclick=20handler=20now=20integrated=20in=20showPan?= =?UTF-8?q?el()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/templates/index.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gui/templates/index.html b/gui/templates/index.html index efb3dec..a33d4ed 100644 --- a/gui/templates/index.html +++ b/gui/templates/index.html @@ -439,7 +439,14 @@ function showPanel(name) { document.querySelectorAll('.content > div').forEach(d => d.classList.add('hidden')); document.getElementById('panel-' + name).classList.remove('hidden'); document.querySelectorAll('.nav-btn').forEach(b => b.classList.remove('active')); - event.target.closest('.nav-btn').classList.add('active'); + if (event && event.target) { + const btn = event.target.closest('.nav-btn'); + if (btn) btn.classList.add('active'); + } + + // Load panel content + if (name === 'vectors') loadVectorsFull(); + if (name === 'reports') loadReports(); } // ─── Mode Selection ─── @@ -670,8 +677,7 @@ async function stopScan() { // ─── Init ─── loadVectorSelector(); -document.querySelector('[onclick*="vectors"]').onclick = () => { showPanel('vectors'); loadVectorsFull(); }; -document.querySelector('[onclick*="reports"]').onclick = () => { showPanel('reports'); loadReports(); }; +loadReports(); // preload reports too // Enter key starts scan document.getElementById('targetInput').addEventListener('keydown', (e) => {