From 30ae847179c6d18a4691772dc46cfe8d9e51fbd5 Mon Sep 17 00:00:00 2001 From: Innei Date: Thu, 18 Jul 2024 19:44:28 +0800 Subject: [PATCH] feat: add about setting Signed-off-by: Innei --- icons/mgc/information_cute_re.svg | 1 + .../src/modules/settings/tabs/about.tsx | 40 +++++++++++++++++++ .../src/pages/settings/(settings)/about.tsx | 9 +++++ 3 files changed, 50 insertions(+) create mode 100644 icons/mgc/information_cute_re.svg create mode 100644 src/renderer/src/modules/settings/tabs/about.tsx create mode 100644 src/renderer/src/pages/settings/(settings)/about.tsx diff --git a/icons/mgc/information_cute_re.svg b/icons/mgc/information_cute_re.svg new file mode 100644 index 0000000000..1de4156655 --- /dev/null +++ b/icons/mgc/information_cute_re.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/renderer/src/modules/settings/tabs/about.tsx b/src/renderer/src/modules/settings/tabs/about.tsx new file mode 100644 index 0000000000..531eb51830 --- /dev/null +++ b/src/renderer/src/modules/settings/tabs/about.tsx @@ -0,0 +1,40 @@ +import { repository } from "@pkg" +import { Logo } from "@renderer/components/icons/logo" +import { StyledButton } from "@renderer/components/ui/button" + +export const SettingAbout = () => ( +
+
+
+ Version +
+
+ + +
+
+ {APP_NAME} + {" "} + {!import.meta.env.PROD ? `(${import.meta.env.MODE})` : ""} +
+
+ + {APP_VERSION} + +
+
+ +
+ { + window.open(`${repository.url}/releases`, "_blank") + }} + > + Changelog + +
+
+
+
+) diff --git a/src/renderer/src/pages/settings/(settings)/about.tsx b/src/renderer/src/pages/settings/(settings)/about.tsx new file mode 100644 index 0000000000..0b79145a9e --- /dev/null +++ b/src/renderer/src/pages/settings/(settings)/about.tsx @@ -0,0 +1,9 @@ +import { SettingAbout } from "@renderer/modules/settings/tabs/about" +import { defineSettingPage } from "@renderer/modules/settings/utils" + +export const loader = defineSettingPage({ + iconName: "i-mgc-information-cute-re", + name: "About", + priority: 9999, +}) +export const Component = () =>