From 22851fd49467ac5fb911777bc4dc1bea5247bb0d Mon Sep 17 00:00:00 2001
From: CallMeTechie <34693633+CallMeTechie@users.noreply.github.com>
Date: Tue, 23 Jun 2026 13:46:30 +0200
Subject: [PATCH] =?UTF-8?q?feat(theme):=20Aurora=20routes=20=E2=80=94=20ba?=
=?UTF-8?q?tch=20multi-select=20(parity=20with=20pro/default)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Aurora already had the batch bar + actions markup and the shared batch JS, but
was missing the trigger button and the table checkbox column, so batch mode could
never be entered. Completes it:
- routes.njk: add the #btn-batch-routes trigger to the page actions.
- auroraRenderTableRow: prepend a .batch-checkbox cell in batch mode.
- auroraRenderTable: prepend the batch
, add .batch-mode table class, and
widen the group-header colspan (6→7) so headers still span the full row.
- aurora.css: .data-table .td-batch / .batch-checkbox styling + batch-mode row cursor.
- layout.njk: add the batch.* GC.t keys (selected/none_selected/enable/disable/
delete/confirm_delete_routes) so the count labels localize (de/en) instead of
falling back to the English JS defaults — a gap pro/default still have.
Aurora-only; shared batch JS + /api/routes/batch unchanged. Verified headless:
checkboxes appear, row-click toggles selection + count, enable/disable/delete +
cancel work, no JS errors; aurora_theme.test 144/0.
---
public/css/aurora.css | 4 ++++
public/js/routes.js | 16 +++++++++++-----
templates/aurora/layout.njk | 6 ++++++
templates/aurora/pages/routes.njk | 4 ++++
4 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/public/css/aurora.css b/public/css/aurora.css
index 8aa9c6b2..841cd4ee 100644
--- a/public/css/aurora.css
+++ b/public/css/aurora.css
@@ -301,6 +301,10 @@ a{color:inherit}
/* "Collapse all" toolbar toggle */
#aurora-collapse-all{color:var(--muted)}
#aurora-collapse-all:hover{color:var(--text)}
+/* Batch-select checkbox column (shown only in batch mode) */
+.data-table .td-batch{width:34px; text-align:center; padding-right:0}
+.data-table .batch-checkbox{width:16px; height:16px; accent-color:var(--teal); cursor:pointer; vertical-align:middle}
+.data-table.batch-mode tbody tr[data-route-id]{cursor:pointer}
/* Grouped member rows — nested under their group header via indent + a left
rail, so they're clearly set off from standalone routes (which sit flush). */
.data-table tr.aurora-route-sub td.cell-name{position:relative; padding-left:34px; color:var(--muted)}
diff --git a/public/js/routes.js b/public/js/routes.js
index b31a48d9..60b581d5 100644
--- a/public/js/routes.js
+++ b/public/js/routes.js
@@ -479,8 +479,13 @@
var delDomain = r.domain ? escapeHtml(r.domain) : ((r.l4_protocol === 'udp' ? 'UDP' : 'TCP') + ' :' + (r.l4_listen_port || ''));
+ // Batch-select checkbox (first column) — only while batch mode is active.
+ var batchCell = batchMode
+ ? '