|
|
|
|
@ -24,7 +24,7 @@ const PanelContextmenu = () => {
|
|
|
|
|
const clipboardElements = useStore(s => s.clipboardElements)
|
|
|
|
|
const setShowImportDSLModal = useStore(s => s.setShowImportDSLModal)
|
|
|
|
|
const { handleNodesPaste } = useNodesInteractions()
|
|
|
|
|
const { handlePaneContextmenuCancel, handleNodeContextmenuCancel } = usePanelInteractions()
|
|
|
|
|
const { handlePanelContextmenuCancel, handleNodeContextmenuCancel } = usePanelInteractions()
|
|
|
|
|
const { handleStartWorkflowRun } = useWorkflowStartRun()
|
|
|
|
|
const { handleAddNote } = useOperator()
|
|
|
|
|
const { exportCheck } = useDSL()
|
|
|
|
|
@ -35,7 +35,7 @@ const PanelContextmenu = () => {
|
|
|
|
|
}, [panelMenu, handleNodeContextmenuCancel])
|
|
|
|
|
|
|
|
|
|
useClickAway(() => {
|
|
|
|
|
handlePaneContextmenuCancel()
|
|
|
|
|
handlePanelContextmenuCancel()
|
|
|
|
|
}, ref)
|
|
|
|
|
|
|
|
|
|
const renderTrigger = () => {
|
|
|
|
|
@ -74,7 +74,7 @@ const PanelContextmenu = () => {
|
|
|
|
|
onClick={(e) => {
|
|
|
|
|
e.stopPropagation()
|
|
|
|
|
handleAddNote()
|
|
|
|
|
handlePaneContextmenuCancel()
|
|
|
|
|
handlePanelContextmenuCancel()
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{t('workflow.nodes.note.addNote')}
|
|
|
|
|
@ -83,7 +83,7 @@ const PanelContextmenu = () => {
|
|
|
|
|
className='flex items-center justify-between px-3 h-8 text-sm text-gray-700 rounded-lg cursor-pointer hover:bg-gray-50'
|
|
|
|
|
onClick={() => {
|
|
|
|
|
handleStartWorkflowRun()
|
|
|
|
|
handlePaneContextmenuCancel()
|
|
|
|
|
handlePanelContextmenuCancel()
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{t('workflow.common.run')}
|
|
|
|
|
@ -100,7 +100,7 @@ const PanelContextmenu = () => {
|
|
|
|
|
onClick={() => {
|
|
|
|
|
if (clipboardElements.length) {
|
|
|
|
|
handleNodesPaste()
|
|
|
|
|
handlePaneContextmenuCancel()
|
|
|
|
|
handlePanelContextmenuCancel()
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
|