|
@@ -23,8 +23,8 @@ import {
|
|
} from '@/app/components/base/icons/src/vender/line/general'
|
|
} from '@/app/components/base/icons/src/vender/line/general'
|
|
import BlockIcon from '@/app/components/workflow/block-icon'
|
|
import BlockIcon from '@/app/components/workflow/block-icon'
|
|
import {
|
|
import {
|
|
|
|
+ useAvailableBlocks,
|
|
useNodeDataUpdate,
|
|
useNodeDataUpdate,
|
|
- useNodesExtraData,
|
|
|
|
useNodesInteractions,
|
|
useNodesInteractions,
|
|
useNodesReadOnly,
|
|
useNodesReadOnly,
|
|
useNodesSyncDraft,
|
|
useNodesSyncDraft,
|
|
@@ -57,8 +57,7 @@ const BasePanel: FC<BasePanelProps> = ({
|
|
const { handleNodeSelect } = useNodesInteractions()
|
|
const { handleNodeSelect } = useNodesInteractions()
|
|
const { handleSyncWorkflowDraft } = useNodesSyncDraft()
|
|
const { handleSyncWorkflowDraft } = useNodesSyncDraft()
|
|
const { nodesReadOnly } = useNodesReadOnly()
|
|
const { nodesReadOnly } = useNodesReadOnly()
|
|
- const nodesExtraData = useNodesExtraData()
|
|
|
|
- const availableNextNodes = nodesExtraData[data.type].availableNextNodes
|
|
|
|
|
|
+ const { availableNextBlocks } = useAvailableBlocks(data.type, data.isInIteration)
|
|
const toolIcon = useToolIcon(data)
|
|
const toolIcon = useToolIcon(data)
|
|
|
|
|
|
const handleResize = useCallback((width: number) => {
|
|
const handleResize = useCallback((width: number) => {
|
|
@@ -157,7 +156,7 @@ const BasePanel: FC<BasePanelProps> = ({
|
|
{cloneElement(children, { id, data })}
|
|
{cloneElement(children, { id, data })}
|
|
</div>
|
|
</div>
|
|
{
|
|
{
|
|
- !!availableNextNodes.length && (
|
|
|
|
|
|
+ !!availableNextBlocks.length && (
|
|
<div className='p-4 border-t-[0.5px] border-t-black/5'>
|
|
<div className='p-4 border-t-[0.5px] border-t-black/5'>
|
|
<div className='flex items-center mb-1 text-gray-700 text-[13px] font-semibold'>
|
|
<div className='flex items-center mb-1 text-gray-700 text-[13px] font-semibold'>
|
|
{t('workflow.panel.nextStep').toLocaleUpperCase()}
|
|
{t('workflow.panel.nextStep').toLocaleUpperCase()}
|