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")}
-
-
- );
-}
function ExperimentalOptions() {
const [enabledFeatures, setEnabledFeatures] = useTriliumOptionJson("experimentalFeatures", true);