Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client/options/database: reorder items
Adorian Dorand169ec3b12cf
diff --git a/apps/client/src/widgets/type_widgets/options/database.spec.tsx b/apps/client/src/widgets/type_widgets/options/database.spec.tsxindex 4045609f36..0e08f3add4 100644--- a/apps/client/src/widgets/type_widgets/options/database.spec.tsx+++ b/apps/client/src/widgets/type_widgets/options/database.spec.tsx@@ -151,7 +151,7 @@ describe("what the database is", () => {expect(server.get).toHaveBeenCalledWith("database/info");- const [ location, created, content, size ] = infoValues();+ const [ location, content, created, size ] = infoValues();// The file is named in full; the link behind it opens the folder holding it, since that is// what a file manager can be pointed at.expect(location).toBe(DATABASE_INFO.filePath);diff --git a/apps/client/src/widgets/type_widgets/options/database.tsx b/apps/client/src/widgets/type_widgets/options/database.tsxindex 3d88867369..68ef11b180 100644--- a/apps/client/src/widgets/type_widgets/options/database.tsx+++ b/apps/client/src/widgets/type_widgets/options/database.tsx@@ -115,12 +115,6 @@ function DatabaseInfo({ refreshToken }: { refreshToken: number }) {</span></CardOption>- <CardOption label={t("database.info_created")}>- <span className="database-info-value">- {formatDateTime(info.utcDateCreated, "long", "none")}- </span>- </CardOption>-<CardOption label={t("database.info_content")}><span className="database-info-value">{t("database.info_notes", { count: info.noteCount })}@@ -129,6 +123,12 @@ function DatabaseInfo({ refreshToken }: { refreshToken: number }) {</span></CardOption>+ <CardOption label={t("database.info_created")}>+ <span className="database-info-value">+ {formatDateTime(info.utcDateCreated, "long", "none")}+ </span>+ </CardOption>+<CardOption label={t("database.info_size")}><span className="database-info-value">{formatSize(info.sizeBytes)}</span></CardOption>@@ -165,25 +165,6 @@ function MaintenanceOptions({ onDatabaseChanged }: { onDatabaseChanged: () => voreturn (<div className="options-section database-maintenance"><Card heading={t("database.maintenance")}>- <CardOption- label={t("database.analyze_space_usage")}- description={t("database.analyze_space_usage_description")}- >- <Button- name="analyze-space-usage-button"- text={t("database.analyze_space_usage_button")}- size="micro"- onClick={() => {- // The Content Manager opens on Active Content unless asked otherwise,- // and navigating by hand rather than by link is what lets us ask first.- requestContentManagerSection("spaceUsage");- // Kept in whichever context this page is shown in — the settings dialog- // holds a note context of its own, outside the tab manager.- void noteContext?.setNote("_optionsContentManager", { keepActiveDialog: true });- }}- />- </CardOption>-<CardOptionlabel={t("database.cleanup")}description={t("database.cleanup_description")}@@ -204,6 +185,25 @@ function MaintenanceOptions({ onDatabaseChanged }: { onDatabaseChanged: () => vo/></CardOption>+ <CardOption+ label={t("database.analyze_space_usage")}+ description={t("database.analyze_space_usage_description")}+ >+ <Button+ name="analyze-space-usage-button"+ text={t("database.analyze_space_usage_button")}+ size="micro"+ onClick={() => {+ // The Content Manager opens on Active Content unless asked otherwise,+ // and navigating by hand rather than by link is what lets us ask first.+ requestContentManagerSection("spaceUsage");+ // Kept in whichever context this page is shown in — the settings dialog+ // holds a note context of its own, outside the tab manager.+ void noteContext?.setNote("_optionsContentManager", { keepActiveDialog: true });+ }}+ />+ </CardOption>+<CardOptionlabel={t("consistency_checks.find_and_fix_label")}description={t("consistency_checks.find_and_fix_description")}