fix: workflow note node copy & link style (#5428)

This commit is contained in:
zxhlyh 2024-06-20 15:08:12 +08:00 committed by GitHub
parent 51d34f5936
commit e4259a8f13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 3 deletions

View File

@ -66,6 +66,7 @@ import {
getKeyboardKeyCodeBySystem,
initialEdges,
initialNodes,
isEventTargetInputArea,
} from './utils'
import {
CUSTOM_NODE,
@ -217,8 +218,18 @@ const Workflow: FC<WorkflowProps> = memo(({
useKeyPress('delete', handleNodesDelete)
useKeyPress(['delete', 'backspace'], handleEdgeDelete)
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.c`, handleNodesCopy, { exactMatch: true, useCapture: true })
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.v`, handleNodesPaste, { exactMatch: true, useCapture: true })
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.c`, (e) => {
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('alt')}.r`, handleStartWorkflowRun, { exactMatch: true, useCapture: true })

View File

@ -15,8 +15,12 @@
}
.note-editor-theme_link {
text-decoration: underline;
cursor: pointer;
color: #155eef;
}
.note-editor-theme_link:hover {
text-decoration: underline;
}
.note-editor-theme_text-strikethrough {