feat(AboutSettings): implement functionality to open license page from about settings
This commit is contained in:
parent
15b286a095
commit
a5ee8548f3
@ -155,6 +155,8 @@ const resources = {
|
|||||||
'about.feedback.title': '📝 Feedback',
|
'about.feedback.title': '📝 Feedback',
|
||||||
'about.feedback.button': 'Feedback',
|
'about.feedback.button': 'Feedback',
|
||||||
'about.contact.title': '📧 Contact',
|
'about.contact.title': '📧 Contact',
|
||||||
|
'about.license.title': '📄 License',
|
||||||
|
'about.license.button': 'License',
|
||||||
'about.contact.button': 'Email',
|
'about.contact.button': 'Email',
|
||||||
'proxy.title': 'Proxy Address',
|
'proxy.title': 'Proxy Address',
|
||||||
'theme.title': 'Theme',
|
'theme.title': 'Theme',
|
||||||
@ -337,6 +339,8 @@ const resources = {
|
|||||||
'about.feedback.title': '📝 意见反馈',
|
'about.feedback.title': '📝 意见反馈',
|
||||||
'about.feedback.button': '反馈',
|
'about.feedback.button': '反馈',
|
||||||
'about.contact.title': '📧 邮件联系',
|
'about.contact.title': '📧 邮件联系',
|
||||||
|
'about.license.title': '📄 许可证',
|
||||||
|
'about.license.button': '查看',
|
||||||
'about.contact.button': '邮件',
|
'about.contact.button': '邮件',
|
||||||
'proxy.title': '代理地址',
|
'proxy.title': '代理地址',
|
||||||
'theme.title': '主题',
|
'theme.title': '主题',
|
||||||
|
|||||||
@ -39,6 +39,10 @@ const AboutSettings: FC = () => {
|
|||||||
onOpenWebsite(url)
|
onOpenWebsite(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const showLicense = () => {
|
||||||
|
window.api.openWebsite('https://raw.githubusercontent.com/kangfenmao/cherry-studio/main/LICENSE')
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
runAsyncFunction(async () => {
|
runAsyncFunction(async () => {
|
||||||
const appInfo = await window.api.getAppInfo()
|
const appInfo = await window.api.getAppInfo()
|
||||||
@ -131,6 +135,11 @@ const AboutSettings: FC = () => {
|
|||||||
</Button>
|
</Button>
|
||||||
</SettingRow>
|
</SettingRow>
|
||||||
<SettingDivider />
|
<SettingDivider />
|
||||||
|
<SettingRow>
|
||||||
|
<SettingRowTitle>{t('settings.about.license.title')}</SettingRowTitle>
|
||||||
|
<Button onClick={showLicense}>{t('settings.about.license.button')}</Button>
|
||||||
|
</SettingRow>
|
||||||
|
<SettingDivider />
|
||||||
<SettingRow>
|
<SettingRow>
|
||||||
<SettingRowTitle>{t('settings.about.contact.title')}</SettingRowTitle>
|
<SettingRowTitle>{t('settings.about.contact.title')}</SettingRowTitle>
|
||||||
<Button onClick={mailto}>{t('settings.about.contact.button')}</Button>
|
<Button onClick={mailto}>{t('settings.about.contact.button')}</Button>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user