feat: adjust branding logo styling

This commit is contained in:
nite-knite 2025-05-21 12:16:57 +08:00
parent db632e363e
commit cb69b926d5
2 changed files with 5 additions and 4 deletions

View File

@ -33,16 +33,17 @@ const DifyLogo: FC<DifyLogoProps> = ({
const { theme } = useTheme()
const themedStyle = (theme === 'dark' && style === 'default') ? 'monochromeWhite' : style
const { systemFeatures } = useGlobalPublicStore()
const hasBrandingLogo = Boolean(systemFeatures.branding.enabled && systemFeatures.branding.workspace_logo)
let src = `${basePath}${logoPathMap[themedStyle]}`
if (systemFeatures.branding.enabled)
if (hasBrandingLogo)
src = systemFeatures.branding.workspace_logo
return (
<img
src={src}
className={classNames('block object-contain', logoSizeMap[size], className)}
alt='Dify logo'
className={classNames('block object-contain', logoSizeMap[size], hasBrandingLogo && 'w-auto', className)}
alt={hasBrandingLogo ? 'Logo' : 'Dify logo'}
/>
)
}

View File

@ -60,7 +60,7 @@ const Header = () => {
{
!isMobile
&& <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 />
</Link>
<div className='font-light text-divider-deep'>/</div>