feat: adjust branding logo styling

pull/20026/head
nite-knite 1 year ago
parent 5e8c1aa81b
commit 1e300baf53

@ -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…
Cancel
Save