diff --git a/src/routes/htmx.py b/src/routes/htmx.py index 592b372..1b5ece9 100644 --- a/src/routes/htmx.py +++ b/src/routes/htmx.py @@ -412,11 +412,11 @@ async def htmx_search( ) -# ── Protected Admin Panel ──────────────────────────────────────────── +# ── Protected Banlist Panel ─────────────────────────────────────────── -@router.get("/htmx/admin") -async def htmx_admin(request: Request): +@router.get("/htmx/banlist") +async def htmx_banlist(request: Request): if not verify_auth(request): return HTMLResponse( '
' @@ -428,7 +428,7 @@ async def htmx_admin(request: Request): ) templates = get_templates() return templates.TemplateResponse( - "dashboard/partials/admin_panel.html", + "dashboard/partials/banlist_panel.html", { "request": request, "dashboard_path": _dashboard_path(request), diff --git a/src/templates/html/login_form.html b/src/templates/html/login_form.html index 247355e..6a99bfa 100644 --- a/src/templates/html/login_form.html +++ b/src/templates/html/login_form.html @@ -129,7 +129,7 @@
-

Admin Panel

+

Krawl Login

Please log in to continue

diff --git a/src/templates/jinja2/dashboard/index.html b/src/templates/jinja2/dashboard/index.html index e3cc6c6..7defadf 100644 --- a/src/templates/jinja2/dashboard/index.html +++ b/src/templates/jinja2/dashboard/index.html @@ -59,7 +59,7 @@ IP Insight - IP Banlist + IP Banlist {# Lock icon (not authenticated) #} @@ -198,8 +198,8 @@
{# ==================== IP BANLIST TAB (protected, loaded via HTMX with server-side auth) ==================== #} -
-
+
+
{# Raw request modal - Alpine.js #} diff --git a/src/templates/jinja2/dashboard/partials/admin_panel.html b/src/templates/jinja2/dashboard/partials/banlist_panel.html similarity index 100% rename from src/templates/jinja2/dashboard/partials/admin_panel.html rename to src/templates/jinja2/dashboard/partials/banlist_panel.html diff --git a/src/templates/static/js/dashboard.js b/src/templates/static/js/dashboard.js index 39e7df9..a1e104e 100644 --- a/src/templates/static/js/dashboard.js +++ b/src/templates/static/js/dashboard.js @@ -46,8 +46,8 @@ document.addEventListener('alpine:init', () => { const h = window.location.hash.slice(1); if (h === 'ip-stats' || h === 'attacks') { this.switchToAttacks(); - } else if (h === 'admin') { - if (this.authenticated) this.switchToAdmin(); + } else if (h === 'banlist') { + if (this.authenticated) this.switchToBanlist(); } else if (h !== 'ip-insight') { if (this.tab !== 'ip-insight') { this.switchToOverview(); @@ -76,15 +76,15 @@ document.addEventListener('alpine:init', () => { window.location.hash = '#overview'; }, - switchToAdmin() { + switchToBanlist() { if (!this.authenticated) return; - this.tab = 'admin'; - window.location.hash = '#admin'; + this.tab = 'banlist'; + window.location.hash = '#banlist'; this.$nextTick(() => { - const container = document.getElementById('admin-htmx-container'); + const container = document.getElementById('banlist-htmx-container'); if (container && typeof htmx !== 'undefined') { - htmx.ajax('GET', `${this.dashboardPath}/htmx/admin`, { - target: '#admin-htmx-container', + htmx.ajax('GET', `${this.dashboardPath}/htmx/banlist`, { + target: '#banlist-htmx-container', swap: 'innerHTML' }); } @@ -99,7 +99,7 @@ document.addEventListener('alpine:init', () => { }); } catch {} this.authenticated = false; - if (this.tab === 'admin') this.switchToOverview(); + if (this.tab === 'banlist') this.switchToOverview(); }, promptAuth() { @@ -138,7 +138,7 @@ document.addEventListener('alpine:init', () => { if (resp.ok) { this.authenticated = true; this.closeAuthModal(); - this.switchToAdmin(); + this.switchToBanlist(); } else { const data = await resp.json().catch(() => ({})); this.authModal.error = data.error || 'Invalid password';