diff --git a/web/src/pages/agent/canvas/edge/index.less b/web/src/pages/agent/canvas/edge/index.less deleted file mode 100644 index 281b67251..000000000 --- a/web/src/pages/agent/canvas/edge/index.less +++ /dev/null @@ -1,31 +0,0 @@ -.edgeButton { - width: 14px; - height: 14px; - background: #eee; - border: 1px solid #fff; - padding: 0; - cursor: pointer; - border-radius: 50%; - font-size: 10px; - line-height: 1; -} - -.edgeButton:hover { - box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.08); -} - -.edgeButtonDark { - width: 14px; - height: 14px; - background: #0e0c0c; - border: 1px solid #fff; - padding: 0; - cursor: pointer; - border-radius: 50%; - font-size: 10px; - line-height: 1; -} - -.edgeButtonDark:hover { - box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.08); -} diff --git a/web/src/pages/agent/canvas/edge/index.tsx b/web/src/pages/agent/canvas/edge/index.tsx index aa6e8f94d..6358fdc9d 100644 --- a/web/src/pages/agent/canvas/edge/index.tsx +++ b/web/src/pages/agent/canvas/edge/index.tsx @@ -7,12 +7,10 @@ import { } from '@xyflow/react'; import useGraphStore from '../../store'; -import { useTheme } from '@/components/theme-provider'; import { useFetchAgent } from '@/hooks/use-agent-request'; import { cn } from '@/lib/utils'; import { useMemo } from 'react'; import { NodeHandleId, Operator } from '../../constant'; -import styles from './index.less'; export function ButtonEdge({ id, @@ -39,9 +37,8 @@ export function ButtonEdge({ targetY, targetPosition, }); - const { theme } = useTheme(); const selectedStyle = useMemo(() => { - return selected ? { strokeWidth: 2, stroke: '#1677ff' } : {}; + return selected ? { strokeWidth: 1, stroke: 'rgba(76, 164, 231, 1)' } : {}; }, [selected]); const onEdgeClick = () => { @@ -71,7 +68,7 @@ export function ButtonEdge({ // The set of elements following source const slicedGraphPath = graphPath.slice(idx + 1); if (slicedGraphPath.some((x) => x === target)) { - return { strokeWidth: 2, stroke: 'red' }; + return { strokeWidth: 1, stroke: 'red' }; } } return {}; @@ -91,6 +88,7 @@ export function ButtonEdge({ path={edgePath} markerEnd={markerEnd} style={{ ...style, ...selectedStyle, ...highlightStyle }} + className="text-text-sub-title" /> @@ -108,7 +106,7 @@ export function ButtonEdge({ >