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);