From 31578521cfa66ed61923092feffdb70bf6b009d2 Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Sun, 22 Mar 2026 10:27:27 +0200 Subject: [PATCH] client/about dialog: create a new UI --- .../src/translations/en/translation.json | 8 +- apps/client/src/widgets/dialogs/about.css | 11 +++ apps/client/src/widgets/dialogs/about.tsx | 80 +++++++++---------- 3 files changed, 57 insertions(+), 42 deletions(-) create mode 100644 apps/client/src/widgets/dialogs/about.css diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index 27891a02ab..fa10640cc8 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -7,7 +7,13 @@ "sync_version": "Sync version:", "build_date": "Build date:", "build_revision": "Build revision:", - "data_directory": "Data directory:" + "data_directory": "Data directory:", + + "version_label": "Version", + "version": "app: {{appVersion}}, database: {{dbVersion}}, sync protocol: {{syncVersion}}", + "build_info": "{{buildDate}}, revision: {{buildRevision}}", + "contributors_label": "Contributors" + }, "toast": { "critical-error": { diff --git a/apps/client/src/widgets/dialogs/about.css b/apps/client/src/widgets/dialogs/about.css new file mode 100644 index 0000000000..2ea9eeb628 --- /dev/null +++ b/apps/client/src/widgets/dialogs/about.css @@ -0,0 +1,11 @@ +.property-sheet-card { + font-size: .85em; + + .tn-card-section { + display: flex; + + > :first-child { + width: 100px; + } + } +} \ No newline at end of file diff --git a/apps/client/src/widgets/dialogs/about.tsx b/apps/client/src/widgets/dialogs/about.tsx index f09cca3191..47da8e9cf8 100644 --- a/apps/client/src/widgets/dialogs/about.tsx +++ b/apps/client/src/widgets/dialogs/about.tsx @@ -8,18 +8,19 @@ import { useState } from "preact/hooks"; import type { CSSProperties } from "preact/compat"; import type { AppInfo } from "@triliumnext/commons"; import { useTriliumEvent } from "../react/hooks.jsx"; +import logo from "../../assets/icon.png"; +import { Card, CardSection } from "../react/Card.js"; +import "./about.css"; export default function AboutDialog() { const [appInfo, setAppInfo] = useState(null); const [shown, setShown] = useState(false); - const forceWordBreak: CSSProperties = { wordBreak: "break-all" }; useTriliumEvent("openAboutDialog", () => setShown(true)); return ( { const appInfo = await server.get("app-info"); @@ -27,44 +28,41 @@ export default function AboutDialog() { }} onHidden={() => setShown(false)} > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{t("about.homepage")}https://github.com/TriliumNext/Trilium
{t("about.app_version")}{appInfo?.appVersion}
{t("about.db_version")}{appInfo?.dbVersion}
{t("about.sync_version")}{appInfo?.syncVersion}
{t("about.build_date")} - {appInfo?.buildDate ? formatDateTime(appInfo.buildDate) : ""} -
{t("about.build_revision")} - {appInfo?.buildRevision && {appInfo.buildRevision}} -
{t("about.data_directory")} - {appInfo?.dataDirectory && ()} -
+
+ +

Trilium Notes

+ + triliumnotes.org + + + + +
{t("about.version_label")}
+
+ {t("about.version", { + appVersion: appInfo?.appVersion, + dbVersion: appInfo?.dbVersion, + syncVersion: appInfo?.syncVersion + })} +
+ {t("about.build_info", { + buildDate: appInfo?.buildDate ? formatDateTime(appInfo.buildDate) : "", + buildRevision: appInfo?.buildRevision ? appInfo.buildRevision.substring(0, 6) : "" + })} +
+
+
+ +
{t("about.contributors_label")}
+
+ +
{t("about.data_directory")}
+
+ {appInfo?.dataDirectory && ()} +
+
+
+
); }