mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-16 20:15:58 +08:00
feat: adjust branding logo styling
This commit is contained in:
parent
db632e363e
commit
cb69b926d5
@ -33,16 +33,17 @@ const DifyLogo: FC<DifyLogoProps> = ({
|
|||||||
const { theme } = useTheme()
|
const { theme } = useTheme()
|
||||||
const themedStyle = (theme === 'dark' && style === 'default') ? 'monochromeWhite' : style
|
const themedStyle = (theme === 'dark' && style === 'default') ? 'monochromeWhite' : style
|
||||||
const { systemFeatures } = useGlobalPublicStore()
|
const { systemFeatures } = useGlobalPublicStore()
|
||||||
|
const hasBrandingLogo = Boolean(systemFeatures.branding.enabled && systemFeatures.branding.workspace_logo)
|
||||||
|
|
||||||
let src = `${basePath}${logoPathMap[themedStyle]}`
|
let src = `${basePath}${logoPathMap[themedStyle]}`
|
||||||
if (systemFeatures.branding.enabled)
|
if (hasBrandingLogo)
|
||||||
src = systemFeatures.branding.workspace_logo
|
src = systemFeatures.branding.workspace_logo
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
src={src}
|
src={src}
|
||||||
className={classNames('block object-contain', logoSizeMap[size], className)}
|
className={classNames('block object-contain', logoSizeMap[size], hasBrandingLogo && 'w-auto', className)}
|
||||||
alt='Dify logo'
|
alt={hasBrandingLogo ? 'Logo' : 'Dify logo'}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ const Header = () => {
|
|||||||
{
|
{
|
||||||
!isMobile
|
!isMobile
|
||||||
&& <div className='flex shrink-0 items-center gap-1.5 self-stretch pl-3'>
|
&& <div className='flex shrink-0 items-center gap-1.5 self-stretch pl-3'>
|
||||||
<Link href="/apps" className='flex h-8 w-[52px] shrink-0 items-center justify-center gap-2'>
|
<Link href="/apps" className='flex h-8 shrink-0 items-center justify-center gap-2 px-0.5'>
|
||||||
<DifyLogo />
|
<DifyLogo />
|
||||||
</Link>
|
</Link>
|
||||||
<div className='font-light text-divider-deep'>/</div>
|
<div className='font-light text-divider-deep'>/</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user