mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-11 03:46:52 +08:00
fix: workflow note node copy & link style (#5428)
This commit is contained in:
@@ -66,6 +66,7 @@ import {
|
|||||||
getKeyboardKeyCodeBySystem,
|
getKeyboardKeyCodeBySystem,
|
||||||
initialEdges,
|
initialEdges,
|
||||||
initialNodes,
|
initialNodes,
|
||||||
|
isEventTargetInputArea,
|
||||||
} from './utils'
|
} from './utils'
|
||||||
import {
|
import {
|
||||||
CUSTOM_NODE,
|
CUSTOM_NODE,
|
||||||
@@ -217,8 +218,18 @@ const Workflow: FC<WorkflowProps> = memo(({
|
|||||||
|
|
||||||
useKeyPress('delete', handleNodesDelete)
|
useKeyPress('delete', handleNodesDelete)
|
||||||
useKeyPress(['delete', 'backspace'], handleEdgeDelete)
|
useKeyPress(['delete', 'backspace'], handleEdgeDelete)
|
||||||
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.c`, handleNodesCopy, { exactMatch: true, useCapture: true })
|
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.c`, (e) => {
|
||||||
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.v`, handleNodesPaste, { exactMatch: true, useCapture: true })
|
if (isEventTargetInputArea(e.target as HTMLElement))
|
||||||
|
return
|
||||||
|
|
||||||
|
handleNodesCopy()
|
||||||
|
}, { exactMatch: true, useCapture: true })
|
||||||
|
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.v`, (e) => {
|
||||||
|
if (isEventTargetInputArea(e.target as HTMLElement))
|
||||||
|
return
|
||||||
|
|
||||||
|
handleNodesPaste()
|
||||||
|
}, { exactMatch: true, useCapture: true })
|
||||||
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.d`, handleNodesDuplicate, { exactMatch: true, useCapture: true })
|
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.d`, handleNodesDuplicate, { exactMatch: true, useCapture: true })
|
||||||
useKeyPress(`${getKeyboardKeyCodeBySystem('alt')}.r`, handleStartWorkflowRun, { exactMatch: true, useCapture: true })
|
useKeyPress(`${getKeyboardKeyCodeBySystem('alt')}.r`, handleStartWorkflowRun, { exactMatch: true, useCapture: true })
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.note-editor-theme_link {
|
.note-editor-theme_link {
|
||||||
text-decoration: underline;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
color: #155eef;
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-editor-theme_link:hover {
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-editor-theme_text-strikethrough {
|
.note-editor-theme_text-strikethrough {
|
||||||
|
|||||||
Reference in New Issue
Block a user