From 6663addfdf6f5fc0d304196426a805ca7f084f29 Mon Sep 17 00:00:00 2001 From: Pizza <33816021+PizzaCow@users.noreply.github.com> Date: Wed, 1 Apr 2026 20:35:48 -0600 Subject: [PATCH] feat: hide empty devices by default, show all toggle --- templates/index.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/templates/index.html b/templates/index.html index 03606e4..3704b31 100644 --- a/templates/index.html +++ b/templates/index.html @@ -119,8 +119,9 @@ .status-up { color: var(--green); font-weight: 600; } .ip-cell { font-family: monospace; color: var(--accent); white-space: nowrap; } - /* Hide empty rows */ - body.hide-empty tr.no-ports { display: none; } + /* Hide empty rows (default on) */ + tr.no-ports { display: none; } + body.show-empty tr.no-ports { display: table-row; } /* Port chips */ .port-chips { display: flex; flex-wrap: wrap; gap: 4px; } @@ -202,7 +203,7 @@
- + @@ -596,8 +597,8 @@ function schedulePortRescan() { // ── Toggle empty rows ──────────────────────────────────────────────────────── function toggleEmpty() { - const hiding = document.body.classList.toggle('hide-empty'); - document.getElementById('toggle-empty-btn').textContent = hiding ? 'Show all' : 'Hide empty'; + const showing = document.body.classList.toggle('show-empty'); + document.getElementById('toggle-empty-btn').textContent = showing ? 'Hide empty' : 'Show all'; } // ── Auto-refresh ─────────────────────────────────────────────────────────────