From 47604e769cf63da514a04b651d76cc735603e42e Mon Sep 17 00:00:00 2001 From: NFish Date: Wed, 7 May 2025 11:51:23 +0800 Subject: [PATCH] fix: get logo from systemfeatures.branding --- .../base/chat/chat-with-history/sidebar/index.tsx | 10 +++++----- web/app/components/share/text-generation/index.tsx | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/web/app/components/base/chat/chat-with-history/sidebar/index.tsx b/web/app/components/base/chat/chat-with-history/sidebar/index.tsx index b7f0615944..fc099950bb 100644 --- a/web/app/components/base/chat/chat-with-history/sidebar/index.tsx +++ b/web/app/components/base/chat/chat-with-history/sidebar/index.tsx @@ -20,6 +20,7 @@ import LogoSite from '@/app/components/base/logo/logo-site' import type { ConversationItem } from '@/models/share' import cn from '@/utils/classnames' import { AccessMode } from '@/models/access-control' +import { useGlobalPublicStore } from '@/context/global-public-context' type Props = { isPanel?: boolean @@ -47,7 +48,7 @@ const Sidebar = ({ isPanel }: Props) => { isResponding, } = useChatWithHistoryContext() const isSidebarCollapsed = sidebarCollapseState - + const systemFeatures = useGlobalPublicStore(s => s.systemFeatures) const [showConfirm, setShowConfirm] = useState(null) const [showRename, setShowRename] = useState(null) @@ -147,10 +148,9 @@ const Sidebar = ({ isPanel }: Props) => { 'flex shrink-0 items-center gap-1.5 px-2', )}>
{t('share.chat.poweredBy')}
- {appData?.custom_config?.replace_webapp_logo && ( - logo - )} - {!appData?.custom_config?.replace_webapp_logo && ( + {systemFeatures.branding.enabled ? ( + logo + ) : ( )} diff --git a/web/app/components/share/text-generation/index.tsx b/web/app/components/share/text-generation/index.tsx index d4c33dff22..21e513211d 100644 --- a/web/app/components/share/text-generation/index.tsx +++ b/web/app/components/share/text-generation/index.tsx @@ -642,10 +642,9 @@ const TextGeneration: FC = ({ !isPC && resultExisted && 'rounded-b-2xl border-b-[0.5px] border-divider-regular', )}>
{t('share.chat.poweredBy')}
- {customConfig?.replace_webapp_logo && ( - logo - )} - {!customConfig?.replace_webapp_logo && ( + {systemFeatures.branding.enabled ? ( + logo + ) : ( )}