diff --git a/web/app/components/workflow/header/index.tsx b/web/app/components/workflow/header/index.tsx index f5cc8d889d..e1f4a73d30 100644 --- a/web/app/components/workflow/header/index.tsx +++ b/web/app/components/workflow/header/index.tsx @@ -14,15 +14,13 @@ import { Grid01 } from '@/app/components/base/icons/src/vender/line/layout' import Button from '@/app/components/base/button' import { ArrowNarrowLeft } from '@/app/components/base/icons/src/vender/line/arrows' import { useStore as useAppStore } from '@/app/components/app/store' -import { Mode } from '@/app/components/workflow/types' const Header: FC = () => { const { t } = useTranslation() const appDetail = useAppStore(s => s.appDetail) const appSidebarExpand = useAppStore(s => s.appSidebarExpand) const isChatMode = useIsChatMode() - const mode = useStore(state => state.mode) - const runTaskId = useStore(state => state.runTaskId) + const runningStatus = useStore(s => s.runningStatus) const handleShowFeatures = useCallback(() => { useStore.setState({ showFeaturesPanel: true }) @@ -37,26 +35,26 @@ const Header: FC = () => { >
{ - appSidebarExpand && ( + appSidebarExpand === 'collapse' && (
{appDetail?.name}
) } { - mode === Mode.Editing && !runTaskId && + !runningStatus && } { - (mode === Mode.Running || runTaskId) && + runningStatus && }
{ - (mode === Mode.Running || runTaskId) && ( + runningStatus && (