diff --git a/containers/libreportal/frontend/css/backup.css b/containers/libreportal/frontend/css/backup.css index 047bed5..bab47c4 100755 --- a/containers/libreportal/frontend/css/backup.css +++ b/containers/libreportal/frontend/css/backup.css @@ -723,44 +723,14 @@ border-top: 1px dashed rgba(var(--text-rgb), 0.08); } -/* Tabbed location editor (Connection | Retention | Advanced). Splits the - formerly long single form into one panel per concern. */ -.backup-loc-tabs { - display: flex; - gap: 4px; - border-bottom: 1px solid rgba(var(--text-rgb), 0.10); - margin-bottom: 16px; +/* The location editor reuses the app-detail tab design (.tabs-wrapper / + .tab-button / .tab-panel from style.css). Only trim the panel padding so it + sits inside the backup row's own padding instead of doubling it. */ +.backup-location-details .tab-panel { + padding: 16px 2px 2px; } -.backup-loc-tab { - appearance: none; - background: transparent; - border: none; - border-bottom: 2px solid transparent; - margin-bottom: -1px; - padding: 8px 14px; - color: rgba(var(--text-rgb), 0.6); - font: inherit; - font-size: 0.9rem; - font-weight: 600; - cursor: pointer; - transition: color 0.15s ease, border-color 0.15s ease; -} - -.backup-loc-tab:hover { - color: var(--text-primary); -} - -.backup-loc-tab.active { - color: var(--accent); - border-bottom-color: var(--accent); -} - -.backup-loc-tab-panel[hidden] { - display: none; -} - -.backup-loc-tab-panel > .category-description { +.backup-location-details .tab-panel > .category-description { margin-top: 0; margin-bottom: 12px; } diff --git a/containers/libreportal/frontend/js/components/backup/backup-page.js b/containers/libreportal/frontend/js/components/backup/backup-page.js index affb874..963fc84 100644 --- a/containers/libreportal/frontend/js/components/backup/backup-page.js +++ b/containers/libreportal/frontend/js/components/backup/backup-page.js @@ -215,7 +215,7 @@ class BackupPage { b.setAttribute('aria-selected', on ? 'true' : 'false'); }); root.querySelectorAll(`[data-tab-panel][data-loc="${tabIdx}"]`).forEach(p => { - p.toggleAttribute('hidden', p.dataset.tabPanel !== tabName); + p.classList.toggle('active', p.dataset.tabPanel === tabName); }); return; } @@ -678,35 +678,41 @@ class BackupPage { yearly: l.custom_retention ? (l.keep_yearly || '') : '' }; - const tab = (id, label) => ` - `; - const advancedBody = groups.advanced.length - ? this.renderLocFields(idx, groups.advanced, l) - : `
How LibrePortal connects to this storage location.
-When to delete old backups from this location.
-Overrides most locations don't need.
-How LibrePortal connects to this storage location.
+When to delete old backups from this location.
+Overrides most locations don't need.
+