Skip to content

Build your personal knowledge base with Trilium Notes

chore(options/advanced): use options row for database integrity check

Elian Doranc352d46a5b34
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 1943cc4b8b..31024c5a74 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -1121,6 +1121,8 @@
},
"consistency_checks": {
"title": "Consistency Checks",
+ "find_and_fix_label": "Find and fix consistency issues",
+ "find_and_fix_description": "Scan for and automatically repair any data consistency issues in the database.",
"find_and_fix_button": "Find and fix consistency issues",
"finding_and_fixing_message": "Finding and fixing consistency issues...",
"issues_fixed_message": "Any consistency issue which may have been found is now fixed."
@@ -1144,7 +1146,8 @@
},
"database_integrity_check": {
"title": "Database Integrity Check",
- "description": "This will check that the database is not corrupted on the SQLite level. It might take some time, depending on the DB size.",
+ "check_integrity_label": "Check database integrity",
+ "check_integrity_description": "Verify that the database is not corrupted on the SQLite level.",
"check_button": "Check database integrity",
"checking_integrity": "Checking database integrity...",
"integrity_check_succeeded": "Integrity check succeeded - no problems found.",
diff --git a/apps/client/src/widgets/type_widgets/options/advanced.tsx b/apps/client/src/widgets/type_widgets/options/advanced.tsx
index 62daed3dc1..2b15ff14fd 100644
--- a/apps/client/src/widgets/type_widgets/options/advanced.tsx
+++ b/apps/client/src/widgets/type_widgets/options/advanced.tsx
@@ -50,10 +50,9 @@ function AdvancedSyncOptions() {
function DatabaseIntegrityOptions() {
return (
<OptionsSection title={t("database_integrity_check.title")}>
- <FormText>{t("database_integrity_check.description")}</FormText>
-
- <Button
- text={t("database_integrity_check.check_button")}
+ <OptionsRowWithButton
+ label={t("database_integrity_check.check_integrity_label")}
+ description={t("database_integrity_check.check_integrity_description")}
onClick={async () => {
toast.showMessage(t("database_integrity_check.checking_integrity"));
@@ -67,8 +66,9 @@ function DatabaseIntegrityOptions() {
}}
/>
- <Button
- text={t("consistency_checks.find_and_fix_button")}
+ <OptionsRowWithButton
+ label={t("consistency_checks.find_and_fix_label")}
+ description={t("consistency_checks.find_and_fix_description")}
onClick={async () => {
toast.showMessage(t("consistency_checks.finding_and_fixing_message"));
await server.post("database/find-and-fix-consistency-issues");