From a57531c95fc33238e3c7ce3cffda7ad1c7d3107e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric?= Date: Sun, 4 Oct 2026 17:25:22 +0200 Subject: [PATCH] Header: show the logged-in user with an OIDC / local badge, or (no auth) Co-Authored-By: Claude Opus 5.5 (1M context) --- web/app.js | 13 +++++++++++++ web/index.html | 1 + web/style.css | 11 +++++++++++ 3 files changed, 25 insertions(+) diff --git a/web/app.js b/web/app.js index bdb4013..a1334f8 100644 --- a/web/app.js +++ b/web/app.js @@ -2638,6 +2638,19 @@ renderPeriod(); fetch('/auth/me').then((res) => (res.ok ? res.json() : null)).then((me) => { if (!me) return; if (me.mode === 'none' && store.get('authWarnHidden') !== '1') $('#authWarn').hidden = false; + const who = $('#whoami'); + if (me.mode === 'none') { + who.classList.add('none'); + who.querySelector('.who-name').textContent = '(no auth)'; + who.hidden = false; + } else if (me.user) { + who.querySelector('.who-name').textContent = me.user; + who.title = me.user; + const badge = who.querySelector('.who-badge'); + badge.textContent = me.mode === 'oidc' ? 'OIDC' : 'local'; + badge.classList.add(me.mode); + who.hidden = false; + } if (me.role === 'viewer') { document.body.classList.add('read-only'); for (const p of document.querySelectorAll('[data-panel="filters"], [data-panel="sources"], [data-panel="data"]')) { diff --git a/web/index.html b/web/index.html index 38d0c4b..30ddba7 100644 --- a/web/index.html +++ b/web/index.html @@ -41,6 +41,7 @@ +