From 9f2927979ba657ce56b5a44094aef99f80140dcd Mon Sep 17 00:00:00 2001 From: hjlarry Date: Sun, 14 Sep 2025 12:50:18 +0800 Subject: [PATCH] fix comment cursor icon --- web/app/components/workflow/comment/index.tsx | 8 +++++--- web/app/components/workflow/index.tsx | 1 + web/app/components/workflow/style.css | 8 ++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/web/app/components/workflow/comment/index.tsx b/web/app/components/workflow/comment/index.tsx index 17b31c9ee6..bb5343f74e 100644 --- a/web/app/components/workflow/comment/index.tsx +++ b/web/app/components/workflow/comment/index.tsx @@ -1,7 +1,6 @@ import type { FC } from 'react' import { memo, useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' -import { RiMessage3Line } from '@remixicon/react' import { useStore } from '../store' import { ControlMode } from '../types' import type { WorkflowComment } from '@/service/workflow-comment' @@ -18,14 +17,17 @@ export const CommentCursor: FC = memo(({ mousePosition }) => return (
- + + + +
) }) diff --git a/web/app/components/workflow/index.tsx b/web/app/components/workflow/index.tsx index 92c69aff6d..ea479dc86e 100644 --- a/web/app/components/workflow/index.tsx +++ b/web/app/components/workflow/index.tsx @@ -358,6 +358,7 @@ export const Workflow: FC = memo(({ edgeTypes={edgeTypes} nodes={nodes} edges={edges} + className={controlMode === ControlMode.Comment ? 'comment-mode-flow' : ''} onNodeDragStart={handleNodeDragStart} onNodeDrag={handleNodeDrag} onNodeDragStop={handleNodeDragStop} diff --git a/web/app/components/workflow/style.css b/web/app/components/workflow/style.css index 9d88ac2644..00265c2921 100644 --- a/web/app/components/workflow/style.css +++ b/web/app/components/workflow/style.css @@ -6,6 +6,14 @@ transition: transform 0.2s ease-in-out; } +/* Comment mode cursor override */ +.comment-mode-flow, +.comment-mode-flow .react-flow__pane, +.comment-mode-flow .react-flow__viewport, +.comment-mode-flow * { + cursor: none !important; +} + #workflow-container .react-flow__nodesselection-rect { border: 1px solid #528BFF; background: rgba(21, 94, 239, 0.05);