From 41786edd3618d02b07c0c4c9b498b528087d05c1 Mon Sep 17 00:00:00 2001 From: librelad Date: Tue, 7 Jul 2026 22:25:03 +0100 Subject: [PATCH] fix(backup/webui): show the retention "Backup style" divider only for Custom MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .backup-retention-preset-block carried a permanent border-bottom (+ padding), but the Keep-* fields it separates the dropdown from are hidden for every preset except Custom — so on Self-hosting/etc. it was an orphaned line with empty space beneath it. Moved the divider + spacing onto an .is-custom state that applyVisibility() toggles alongside the fields. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../backup/configuration/js/backup-retention-presets.js | 3 +++ .../frontend/components/backup/core/css/backup.css | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/containers/libreportal/frontend/components/backup/configuration/js/backup-retention-presets.js b/containers/libreportal/frontend/components/backup/configuration/js/backup-retention-presets.js index 46b33eb..03bad93 100644 --- a/containers/libreportal/frontend/components/backup/configuration/js/backup-retention-presets.js +++ b/containers/libreportal/frontend/components/backup/configuration/js/backup-retention-presets.js @@ -64,6 +64,9 @@ Object.assign(BackupPage.prototype, { const applyVisibility = (presetKey) => { const isCustom = presetKey === 'custom'; + // Gate the block's divider on custom too — it separates the dropdown + // from the Keep-* fields, which only show in the custom state. + block.classList.toggle('is-custom', isCustom); wrappers.forEach(w => { if (w) w.style.display = isCustom ? '' : 'none'; }); }; applyVisibility(preset); diff --git a/containers/libreportal/frontend/components/backup/core/css/backup.css b/containers/libreportal/frontend/components/backup/core/css/backup.css index 84b995e..b4be3a9 100755 --- a/containers/libreportal/frontend/components/backup/core/css/backup.css +++ b/containers/libreportal/frontend/components/backup/core/css/backup.css @@ -713,6 +713,13 @@ display: flex; flex-direction: column; gap: 6px; +} + +/* The divider (and its spacing) belongs only to the "Custom" state: the Keep-* + fields it separates the dropdown from are hidden for every preset except + custom, so otherwise it's an orphaned line under the dropdown. The .is-custom + class is toggled by applyVisibility() in the retention enhancer. */ +.backup-retention-preset-block.is-custom { padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid rgba(var(--text-rgb), 0.08);