diff --git a/frontend/src/components/S3BackupConfigDrawer.tsx b/frontend/src/components/S3BackupConfigDrawer.tsx index d11e3e1..153d77e 100644 --- a/frontend/src/components/S3BackupConfigDrawer.tsx +++ b/frontend/src/components/S3BackupConfigDrawer.tsx @@ -58,9 +58,11 @@ export default function S3BackupConfigDrawer({ setOpen(false); toast.success("S3 backup configuration saved successfully"); }, - onError: (error: any) => { + onError: (error: Error & { response?: { data?: { detail?: string } } }) => { console.error("Failed to update S3 backup configuration:", error); - const message = error?.response?.data?.detail || "Failed to save S3 configuration. Please check your settings and try again."; + const message = + error?.response?.data?.detail || + "Failed to save S3 configuration. Please check your settings and try again."; toast.error(message); }, }); @@ -73,11 +75,15 @@ export default function S3BackupConfigDrawer({ }), onSuccess: () => { console.log("S3 connection test successful"); - toast.success("S3 connection test successful! Your configuration is working correctly."); + toast.success( + "S3 connection test successful! Your configuration is working correctly.", + ); }, - onError: (error: any) => { + onError: (error: Error & { response?: { data?: { detail?: string } } }) => { console.error("Failed to test S3 connection:", error); - const message = error?.response?.data?.detail || "S3 connection test failed. Please verify your credentials and settings."; + const message = + error?.response?.data?.detail || + "S3 connection test failed. Please verify your credentials and settings."; toast.error(message); }, }); @@ -98,9 +104,7 @@ export default function S3BackupConfigDrawer({ return ( - - {trigger || } - + {trigger || }
@@ -148,7 +152,10 @@ export default function S3BackupConfigDrawer({ type="password" value={config.secret_access_key} onChange={(e) => - setConfig({ ...config, secret_access_key: e.target.value }) + setConfig({ + ...config, + secret_access_key: e.target.value, + }) } placeholder="Your AWS Secret Access Key" required @@ -212,15 +219,21 @@ export default function S3BackupConfigDrawer({

- Enable for older S3 implementations or certain S3-compatible services + Enable for older S3 implementations or certain S3-compatible + services

)}
- {config.enabled && isConfigValid && (
@@ -786,26 +790,33 @@ export default function Settings() { S3 Backup
-
+
- {backupSettings.s3.enabled ? 'Enabled' : 'Disabled'} + {backupSettings.s3.enabled + ? "Enabled" + : "Disabled"}

- Bucket: {backupSettings.s3.bucket_name} + Bucket:{" "} + {backupSettings.s3.bucket_name}

- Region: {backupSettings.s3.region} + Region:{" "} + {backupSettings.s3.region}

{backupSettings.s3.endpoint_url && (

- Endpoint: {backupSettings.s3.endpoint_url} + Endpoint:{" "} + {backupSettings.s3.endpoint_url}

)}
@@ -813,16 +824,17 @@ export default function Settings() {
- +
Backup Information

- Database backups are stored in the "leggen_backups/" folder in your S3 bucket. - Backups include the complete SQLite database file. + Database backups are stored in the "leggen_backups/" + folder in your S3 bucket. Backups include the complete + SQLite database file.

- -