feat(AboutSettings): implement functionality to open license page from about settings

This commit is contained in:
kangfenmao 2024-07-30 16:33:58 +08:00
parent 15b286a095
commit a5ee8548f3
2 changed files with 13 additions and 0 deletions

View File

@ -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': '主题',

View File

@ -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 = () => {
</Button>
</SettingRow>
<SettingDivider />
<SettingRow>
<SettingRowTitle>{t('settings.about.license.title')}</SettingRowTitle>
<Button onClick={showLicense}>{t('settings.about.license.button')}</Button>
</SettingRow>
<SettingDivider />
<SettingRow>
<SettingRowTitle>{t('settings.about.contact.title')}</SettingRowTitle>
<Button onClick={mailto}>{t('settings.about.contact.button')}</Button>