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

This commit is contained in:
Elian Doran
2026-04-13 14:59:31 +03:00
parent c262187496
commit c352d46a5b
2 changed files with 10 additions and 7 deletions

View File

@@ -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.",

View File

@@ -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");