mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-01 09:49:03 +08:00
feat: add dark mode support for DMXAPI logo in settings
- Introduced a new dark mode logo for DMXAPI and updated the logo rendering logic in the DMXAPISettings component to switch between light and dark logos based on the current theme.
This commit is contained in:
parent
6af5d0e0d6
commit
2bf2e2febb
BIN
src/renderer/src/assets/images/providers/dmxapi-logo-dark.webp
Normal file
BIN
src/renderer/src/assets/images/providers/dmxapi-logo-dark.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@ -1,4 +1,6 @@
|
||||
import DmxapiLogo from '@renderer/assets/images/providers/dmxapi-logo.webp'
|
||||
import DmxapiLogoDark from '@renderer/assets/images/providers/dmxapi-logo-dark.webp'
|
||||
import { useTheme } from '@renderer/context/ThemeProvider'
|
||||
import { useProvider } from '@renderer/hooks/useProvider'
|
||||
import { Provider } from '@renderer/types'
|
||||
import { Radio, RadioChangeEvent, Space } from 'antd'
|
||||
@ -40,6 +42,7 @@ const PlatformOptions = [
|
||||
|
||||
const DMXAPISettings: FC<DMXAPISettingsProps> = ({ provider: initialProvider }) => {
|
||||
const { provider, updateProvider } = useProvider(initialProvider.id)
|
||||
const { theme } = useTheme()
|
||||
|
||||
const { t } = useTranslation()
|
||||
|
||||
@ -71,7 +74,7 @@ const DMXAPISettings: FC<DMXAPISettingsProps> = ({ provider: initialProvider })
|
||||
<Container>
|
||||
<Space direction="vertical" style={{ width: '100%' }}>
|
||||
<LogoContainer>
|
||||
<Logo src={DmxapiLogo}></Logo>
|
||||
<Logo src={theme === 'dark' ? DmxapiLogoDark : DmxapiLogo}></Logo>
|
||||
</LogoContainer>
|
||||
|
||||
<SettingSubtitle style={{ marginTop: 5 }}>{t('settings.provider.dmxapi.select_platform')}</SettingSubtitle>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user