From a5ee8548f3223f613d16d34a35a72e509f90312d Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Tue, 30 Jul 2024 16:33:58 +0800 Subject: [PATCH] feat(AboutSettings): implement functionality to open license page from about settings --- src/renderer/src/i18n/index.ts | 4 ++++ src/renderer/src/pages/settings/AboutSettings.tsx | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/src/renderer/src/i18n/index.ts b/src/renderer/src/i18n/index.ts index 26afaf88..3a531dfc 100644 --- a/src/renderer/src/i18n/index.ts +++ b/src/renderer/src/i18n/index.ts @@ -155,6 +155,8 @@ const resources = { 'about.feedback.title': '๐Ÿ“ Feedback', 'about.feedback.button': 'Feedback', 'about.contact.title': '๐Ÿ“ง Contact', + 'about.license.title': '๐Ÿ“„ License', + 'about.license.button': 'License', 'about.contact.button': 'Email', 'proxy.title': 'Proxy Address', 'theme.title': 'Theme', @@ -337,6 +339,8 @@ const resources = { 'about.feedback.title': '๐Ÿ“ ๆ„่งๅ้ฆˆ', 'about.feedback.button': 'ๅ้ฆˆ', 'about.contact.title': '๐Ÿ“ง ้‚ฎไปถ่”็ณป', + 'about.license.title': '๐Ÿ“„ ่ฎธๅฏ่ฏ', + 'about.license.button': 'ๆŸฅ็œ‹', 'about.contact.button': '้‚ฎไปถ', 'proxy.title': 'ไปฃ็†ๅœฐๅ€', 'theme.title': 'ไธป้ข˜', diff --git a/src/renderer/src/pages/settings/AboutSettings.tsx b/src/renderer/src/pages/settings/AboutSettings.tsx index e640f94f..2367bda2 100644 --- a/src/renderer/src/pages/settings/AboutSettings.tsx +++ b/src/renderer/src/pages/settings/AboutSettings.tsx @@ -39,6 +39,10 @@ const AboutSettings: FC = () => { onOpenWebsite(url) } + const showLicense = () => { + window.api.openWebsite('https://raw.githubusercontent.com/kangfenmao/cherry-studio/main/LICENSE') + } + useEffect(() => { runAsyncFunction(async () => { const appInfo = await window.api.getAppInfo() @@ -131,6 +135,11 @@ const AboutSettings: FC = () => { + + {t('settings.about.license.title')} + + + {t('settings.about.contact.title')}