From 7922d4bc79c680025b329cc21bc1e8cdd146906f Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Thu, 30 Apr 2026 21:33:02 -0400 Subject: [PATCH] Add notification bell, settings modal, and context-sensitive footer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Notification bell in header polls /api/status and shows active alerts with severity-colored dots; badge counts unread items via localStorage - Settings modal ([ * ] CFG) controls auto-refresh interval (15s/30s/1m/5m/off) persisted to localStorage and wired into lt.autoRefresh on all pages - Context-sensitive footer hints: Dashboard shows REFRESH + SUPPRESS, Link Debug shows REFRESH, all pages show CFG + HELP - Added S key (quick suppress) and * key (settings) shortcuts - ⌘K affordance button added to header-right - R key now uses lt.autoRefresh.now() so it works on any page - refreshAll() pushes fresh events to notification bell on each poll Co-Authored-By: Claude Sonnet 4.6 --- static/app.js | 1 + templates/base.html | 274 +++++++++++++++++++++++++++++++++++++++---- templates/index.html | 11 +- templates/links.html | 8 +- 4 files changed, 272 insertions(+), 22 deletions(-) diff --git a/static/app.js b/static/app.js index d753b12..3fe4e00 100644 --- a/static/app.js +++ b/static/app.js @@ -53,6 +53,7 @@ async function refreshAll() { const status = statusResult.value; updateEventsTable(status.events || [], status.total_active); updateStatusBar(status.summary || {}, status.last_check || '', status.daemon_ok); + if (typeof window.gandalfNotifUpdate === 'function') window.gandalfNotifUpdate(status.events || []); } else { showToast('Status data unavailable', 'warning'); } diff --git a/templates/base.html b/templates/base.html index e4e0887..e605a11 100644 --- a/templates/base.html +++ b/templates/base.html @@ -140,6 +140,38 @@ {% if user.groups and 'admin' in user.groups %} ADMIN {% endif %} + + +
+ + +
+ + + + @@ -170,12 +202,19 @@ {% block content %}{% endblock %} - +