From d7d2af7b9ba1e346f492613ade3cec4d1dda7b23 Mon Sep 17 00:00:00 2001 From: Christoph Gasser Date: Mon, 27 Apr 2026 16:22:52 +0200 Subject: [PATCH] Default sort: AP list by Name, client popup by IP Co-Authored-By: Claude Sonnet 4.6 --- app/templates/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/templates/index.html b/app/templates/index.html index d67a221..988eece 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -328,8 +328,8 @@ }); }); - // Sort by IP on initial load - document.querySelector('[data-sort="ip"]')?.click(); + // Sort by Name on initial load + document.querySelector('[data-sort="name"]')?.click(); // ── IP range filter button ───────────────────────────────────────────────── const btnIpFilter = document.getElementById('btn-ip-filter'); @@ -610,6 +610,8 @@ clientsSubtitle.textContent = `${clients.length} device${clients.length !== 1 ? 's' : ''} connected`; + clients.sort((a, b) => ipToNum(a.ip) - ipToNum(b.ip)); + const rows = clients.map(c => { const displayName = esc(c.name || c.hostName || c.hostname || ''); const mac = esc(c.mac || '—');