diff --git a/containers/libreportal/frontend/css/backup.css b/containers/libreportal/frontend/css/backup.css index bcb5e05..fe042c8 100755 --- a/containers/libreportal/frontend/css/backup.css +++ b/containers/libreportal/frontend/css/backup.css @@ -794,6 +794,12 @@ transform: translateX(16px); } +/* Enable/disable toggle in a location row header — sits between the row + info and the expand chevron, controlling the location without expanding it. */ +.backup-loc-enable-toggle { + margin-right: 6px; +} + /* Repo card extras */ .backup-repo-stats { display: flex; diff --git a/containers/libreportal/frontend/js/components/backup/backup-page.js b/containers/libreportal/frontend/js/components/backup/backup-page.js index c4cfdb2..6a0a489 100644 --- a/containers/libreportal/frontend/js/components/backup/backup-page.js +++ b/containers/libreportal/frontend/js/components/backup/backup-page.js @@ -52,14 +52,14 @@ const BACKUP_LOC_FIELD_DEFS = { }; const BACKUP_LOC_FIELDS_BY_TYPE = { - local: ['NAME', 'ENABLED', 'ENGINE', 'TYPE', 'PATH_MODE', 'PATH', 'APPEND_ONLY'], - sftp: ['NAME', 'ENABLED', 'ENGINE', 'TYPE', 'SSH_USER', 'SSH_HOST', 'SSH_PORT', 'SSH_PATH', 'SSH_AUTH', 'SSH_PASS', 'URI', 'APPEND_ONLY'], - rest: ['NAME', 'ENABLED', 'ENGINE', 'TYPE', 'URI', 'APPEND_ONLY'], - s3: ['NAME', 'ENABLED', 'ENGINE', 'TYPE', 'URI', 'S3_ACCESS_KEY', 'S3_SECRET_KEY', 'APPEND_ONLY'], - b2: ['NAME', 'ENABLED', 'ENGINE', 'TYPE', 'URI', 'B2_ACCOUNT_ID', 'B2_ACCOUNT_KEY', 'APPEND_ONLY'], - gs: ['NAME', 'ENABLED', 'ENGINE', 'TYPE', 'URI', 'APPEND_ONLY'], - azure: ['NAME', 'ENABLED', 'ENGINE', 'TYPE', 'URI', 'APPEND_ONLY'], - rclone: ['NAME', 'ENABLED', 'ENGINE', 'TYPE', 'URI', 'APPEND_ONLY'] + local: ['NAME', 'ENGINE', 'TYPE', 'PATH_MODE', 'PATH', 'APPEND_ONLY'], + sftp: ['NAME', 'ENGINE', 'TYPE', 'SSH_USER', 'SSH_HOST', 'SSH_PORT', 'SSH_PATH', 'SSH_AUTH', 'SSH_PASS', 'URI', 'APPEND_ONLY'], + rest: ['NAME', 'ENGINE', 'TYPE', 'URI', 'APPEND_ONLY'], + s3: ['NAME', 'ENGINE', 'TYPE', 'URI', 'S3_ACCESS_KEY', 'S3_SECRET_KEY', 'APPEND_ONLY'], + b2: ['NAME', 'ENGINE', 'TYPE', 'URI', 'B2_ACCOUNT_ID', 'B2_ACCOUNT_KEY', 'APPEND_ONLY'], + gs: ['NAME', 'ENGINE', 'TYPE', 'URI', 'APPEND_ONLY'], + azure: ['NAME', 'ENGINE', 'TYPE', 'URI', 'APPEND_ONLY'], + rclone: ['NAME', 'ENGINE', 'TYPE', 'URI', 'APPEND_ONLY'] }; function backupRetentionDetectPreset(values, includeInherit = false) { @@ -164,6 +164,13 @@ class BackupPage { return; } + const locEnable = e.target.closest('[data-action="toggle-location-enabled"]'); + if (locEnable) { + const cb = locEnable.querySelector('input[type="checkbox"]'); + this.setLocationEnabled(parseInt(locEnable.dataset.loc, 10), cb ? cb.checked : true); + return; + } + const locHeader = e.target.closest('[data-action="toggle-location"]'); if (locHeader) { this.toggleLocationExpand(parseInt(locHeader.dataset.loc, 10)); @@ -546,6 +553,10 @@ class BackupPage { · ${size} + + + + @@ -585,16 +596,31 @@ class BackupPage { return `
How LibrePortal connects to this storage location.
+When to delete old backups from this location.
-When to delete old backups from this location.
+