feat(显示设置): 自定义css 增加cherrycss入口方便快速获取样式 (#2807)
* feat(显示设置): 自定义css 增加cherrycss入口方便快速获取样式 这是个无用的小辣鸡功能 = =、 * feat(显示设置): 自定义css 增加cherrycss入口方便快速获取样式 这是个无用的小辣鸡功能 = =、
This commit is contained in:
parent
1e24b7bc45
commit
ff55739376
@ -1,5 +1,7 @@
|
||||
import { SyncOutlined } from '@ant-design/icons'
|
||||
import MinApp from '@renderer/components/MinApp'
|
||||
import { isMac } from '@renderer/config/constant'
|
||||
import { AppLogo } from '@renderer/config/env'
|
||||
import { DEFAULT_MIN_APPS } from '@renderer/config/minapps'
|
||||
import { useTheme } from '@renderer/context/ThemeProvider'
|
||||
import { useMinapps } from '@renderer/hooks/useMinapps'
|
||||
@ -100,7 +102,14 @@ const DisplaySettings: FC = () => {
|
||||
],
|
||||
[t]
|
||||
)
|
||||
|
||||
const onOpenCherrycss = () => {
|
||||
MinApp.start({
|
||||
id: 'cherrycss',
|
||||
name: 'Cherry Studio Theme Gallery',
|
||||
url: 'https://cherrycss.com/',
|
||||
logo: AppLogo
|
||||
})
|
||||
}
|
||||
return (
|
||||
<SettingContainer theme={themeMode}>
|
||||
<SettingGroup theme={theme}>
|
||||
@ -194,7 +203,10 @@ const DisplaySettings: FC = () => {
|
||||
/>
|
||||
</SettingGroup>
|
||||
<SettingGroup theme={theme}>
|
||||
<SettingTitle>{t('settings.display.custom.css')}</SettingTitle>
|
||||
<SettingTitle>
|
||||
{t('settings.display.custom.css')}
|
||||
<TitleExtra onClick={onOpenCherrycss}>从cherrycss获取</TitleExtra>
|
||||
</SettingTitle>
|
||||
<SettingDivider />
|
||||
<Input.TextArea
|
||||
value={customCss}
|
||||
@ -210,6 +222,12 @@ const DisplaySettings: FC = () => {
|
||||
)
|
||||
}
|
||||
|
||||
const TitleExtra = styled.div`
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
opacity: 0.7;
|
||||
`
|
||||
const ResetButtonWrapper = styled.div`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user