From 3dc0d25c4d70b2cb32c4bd4daaf6c895d01243ab Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 13 Apr 2026 15:01:51 +0300 Subject: [PATCH] chore(options/advanced): merge database-related options --- .../src/translations/en/translation.json | 5 +++ .../widgets/type_widgets/options/advanced.tsx | 33 ++++++++----------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index 31024c5a74..39de45b8a3 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -1167,8 +1167,13 @@ "finished-successfully": "Sync finished successfully.", "failed": "Sync failed: {{message}}" }, + "database": { + "title": "Database" + }, "vacuum_database": { "title": "Vacuum Database", + "vacuum_label": "Vacuum database", + "vacuum_description": "Rebuild the database to reduce file size. No data will be changed.", "description": "This will rebuild the database which will typically result in a smaller database file. No data will be actually changed.", "button_text": "Vacuum database", "vacuuming_database": "Vacuuming database...", diff --git a/apps/client/src/widgets/type_widgets/options/advanced.tsx b/apps/client/src/widgets/type_widgets/options/advanced.tsx index 2b15ff14fd..53203a5903 100644 --- a/apps/client/src/widgets/type_widgets/options/advanced.tsx +++ b/apps/client/src/widgets/type_widgets/options/advanced.tsx @@ -15,9 +15,8 @@ import OptionsSection from "./components/OptionsSection"; export default function AdvancedSettings() { return <> - + - ; } @@ -47,9 +46,9 @@ function AdvancedSyncOptions() { ); } -function DatabaseIntegrityOptions() { +function DatabaseOptions() { return ( - + + + { + toast.showMessage(t("vacuum_database.vacuuming_database")); + await server.post("database/vacuum-database"); + toast.showMessage(t("vacuum_database.database_vacuumed")); + }} + /> ); } @@ -164,22 +173,6 @@ function ExistingAnonymizedDatabases({ databases }: { databases: AnonymizedDbRes ); } -function VacuumDatabaseOptions() { - return ( - - {t("vacuum_database.description")} - -