mirror of
https://github.com/langgenius/dify.git
synced 2026-08-28 21:23:22 +08:00
fix: get logo from systemfeatures.branding
This commit is contained in:
parent
afe6dc84eb
commit
47604e769c
@ -20,6 +20,7 @@ import LogoSite from '@/app/components/base/logo/logo-site'
|
|||||||
import type { ConversationItem } from '@/models/share'
|
import type { ConversationItem } from '@/models/share'
|
||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
import { AccessMode } from '@/models/access-control'
|
import { AccessMode } from '@/models/access-control'
|
||||||
|
import { useGlobalPublicStore } from '@/context/global-public-context'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
isPanel?: boolean
|
isPanel?: boolean
|
||||||
@ -47,7 +48,7 @@ const Sidebar = ({ isPanel }: Props) => {
|
|||||||
isResponding,
|
isResponding,
|
||||||
} = useChatWithHistoryContext()
|
} = useChatWithHistoryContext()
|
||||||
const isSidebarCollapsed = sidebarCollapseState
|
const isSidebarCollapsed = sidebarCollapseState
|
||||||
|
const systemFeatures = useGlobalPublicStore(s => s.systemFeatures)
|
||||||
const [showConfirm, setShowConfirm] = useState<ConversationItem | null>(null)
|
const [showConfirm, setShowConfirm] = useState<ConversationItem | null>(null)
|
||||||
const [showRename, setShowRename] = useState<ConversationItem | null>(null)
|
const [showRename, setShowRename] = useState<ConversationItem | null>(null)
|
||||||
|
|
||||||
@ -147,10 +148,9 @@ const Sidebar = ({ isPanel }: Props) => {
|
|||||||
'flex shrink-0 items-center gap-1.5 px-2',
|
'flex shrink-0 items-center gap-1.5 px-2',
|
||||||
)}>
|
)}>
|
||||||
<div className='system-2xs-medium-uppercase text-text-tertiary'>{t('share.chat.poweredBy')}</div>
|
<div className='system-2xs-medium-uppercase text-text-tertiary'>{t('share.chat.poweredBy')}</div>
|
||||||
{appData?.custom_config?.replace_webapp_logo && (
|
{systemFeatures.branding.enabled ? (
|
||||||
<img src={appData?.custom_config?.replace_webapp_logo} alt='logo' className='block h-5 w-auto' />
|
<img src={systemFeatures.branding.login_page_logo} alt='logo' className='block h-5 w-auto' />
|
||||||
)}
|
) : (
|
||||||
{!appData?.custom_config?.replace_webapp_logo && (
|
|
||||||
<LogoSite className='!h-5' />
|
<LogoSite className='!h-5' />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -642,10 +642,9 @@ const TextGeneration: FC<IMainProps> = ({
|
|||||||
!isPC && resultExisted && 'rounded-b-2xl border-b-[0.5px] border-divider-regular',
|
!isPC && resultExisted && 'rounded-b-2xl border-b-[0.5px] border-divider-regular',
|
||||||
)}>
|
)}>
|
||||||
<div className='system-2xs-medium-uppercase text-text-tertiary'>{t('share.chat.poweredBy')}</div>
|
<div className='system-2xs-medium-uppercase text-text-tertiary'>{t('share.chat.poweredBy')}</div>
|
||||||
{customConfig?.replace_webapp_logo && (
|
{systemFeatures.branding.enabled ? (
|
||||||
<img src={customConfig?.replace_webapp_logo} alt='logo' className='block h-5 w-auto' />
|
<img src={systemFeatures.branding.login_page_logo} alt='logo' className='block h-5 w-auto' />
|
||||||
)}
|
) : (
|
||||||
{!customConfig?.replace_webapp_logo && (
|
|
||||||
<LogoSite className='!h-5' />
|
<LogoSite className='!h-5' />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user