From cc3f796ca33bf6aa2152b651660aa50cf284183a Mon Sep 17 00:00:00 2001 From: DonVoo Date: Mon, 13 Jul 2026 11:39:15 +0200 Subject: [PATCH] Restore pane resizing --- backend/00-router.go | 32 ++++++++++++++++---------------- frontend-js/dist/app.js | 14 +++++++++----- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/backend/00-router.go b/backend/00-router.go index d7a0ba8..dab5922 100644 --- a/backend/00-router.go +++ b/backend/00-router.go @@ -73,8 +73,8 @@ func renderStartPage(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, ` Mail-Graveyard - - + +
@@ -121,9 +121,9 @@ func renderShell(w http.ResponseWriter, r *http.Request, active, readingPane str fmt.Fprintf(w, ` Mail-Graveyard - + - +
@@ -697,9 +697,9 @@ func renderAccountsPage(w http.ResponseWriter, r *http.Request, accounts []Accou fmt.Fprintf(w, ` Konten-Verwaltung - Mail-Graveyard - + - +
@@ -743,9 +743,9 @@ func renderArchivesPage(w http.ResponseWriter, r *http.Request, archives []strin fmt.Fprintf(w, ` Archiv-mbox Verwaltung - Mail-Graveyard - + - +
@@ -791,9 +791,9 @@ func renderUsersPage(w http.ResponseWriter, r *http.Request, users []AppUser, ed fmt.Fprintf(w, ` Benutzerverwaltung - Mail-Graveyard - + - +
@@ -865,9 +865,9 @@ func renderTransferPage(w http.ResponseWriter, r *http.Request, mode transferMod fmt.Fprintf(w, ` %s - Mail-Graveyard - + - +
@@ -1317,9 +1317,9 @@ func renderSourceEmailBoxPage(w http.ResponseWriter, r *http.Request, accounts [ fmt.Fprintf(w, ` Quell-Postfach - Mail-Graveyard - + - +
@@ -1361,9 +1361,9 @@ func renderTargetEmailBoxPage(w http.ResponseWriter, r *http.Request, accounts [ fmt.Fprintf(w, ` Ziel-Postfach - Mail-Graveyard - + - +
diff --git a/frontend-js/dist/app.js b/frontend-js/dist/app.js index 8fbac24..9da997a 100644 --- a/frontend-js/dist/app.js +++ b/frontend-js/dist/app.js @@ -83,9 +83,10 @@ function move(moveEvent) { const delta = moveEvent.clientX - startX; const next = start.slice(); - const left = Math.max(minWidths[index], start[index] + delta); + const mins = minWidths(container); + const left = Math.max(mins[index], start[index] + delta); const used = left - start[index]; - const right = Math.max(minWidths[index + 1], start[index + 1] - used); + const right = Math.max(mins[index + 1], start[index + 1] - used); const actual = start[index + 1] - right; next[index] = start[index] + actual; next[index + 1] = right; @@ -106,9 +107,12 @@ }); } - window.addEventListener("DOMContentLoaded", () => bind(document.querySelector(".transfer-workbench"))); - window.addEventListener("DOMContentLoaded", () => bind(document.querySelector(".four-pane"))); - window.addEventListener("DOMContentLoaded", () => bind(document.querySelector(".three-pane"))); + function bindAll() { + document.querySelectorAll(".transfer-workbench, .four-pane, .three-pane").forEach(bind); + } + + window.addEventListener("DOMContentLoaded", bindAll); + document.addEventListener("htmx:afterSwap", bindAll); })(); (function () {