diff --git a/web/app/components/workflow/operator/control.tsx b/web/app/components/workflow/operator/control.tsx index e80451f8bf..a0e68380bc 100644 --- a/web/app/components/workflow/operator/control.tsx +++ b/web/app/components/workflow/operator/control.tsx @@ -28,6 +28,8 @@ import TipPopup from './tip-popup' import ExportImage from './export-image' import { useOperator } from './hooks' import cn from '@/utils/classnames' +import { useStore as useAppStore } from '@/app/components/app/store' +import { useGlobalPublicStore } from '@/context/global-public-context' const Control = () => { const { t } = useTranslation() @@ -41,6 +43,9 @@ const Control = () => { getNodesReadOnly, } = useNodesReadOnly() const { handleToggleMaximizeCanvas } = useWorkflowCanvasMaximize() + const isCollaborationEnabled = useGlobalPublicStore(s => s.systemFeatures.enable_collaboration_mode) + const appDetail = useAppStore(state => state.appDetail) + const isCommentVisible = isCollaborationEnabled && (appDetail?.mode === 'workflow' || appDetail?.mode === 'advanced-chat') const addNote = (e: MouseEvent) => { if (getNodesReadOnly()) @@ -89,18 +94,20 @@ const Control = () => { - -
- -
-
+ {isCommentVisible && ( + +
+ +
+
+ )}