wwf
2 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
app/components/workflow/operator/add-block.tsx
@@ -9,7 +9,6 @@
import type { OffsetOptions } from '@floating-ui/react'
import {
  generateNewNode,
  getNodeCustomTypeByNodeDataType,
} from '../utils'
import {
  useAvailableBlocks,
@@ -57,7 +56,6 @@
    const nodes = getNodes()
    const nodesWithSameType = nodes.filter(node => node.data.type === type)
    const { newNode } = generateNewNode({
      type: getNodeCustomTypeByNodeDataType(type),
      data: {
        ...NODES_INITIAL_DATA[type],
        title: nodesWithSameType.length > 0 ? `${t(`workflow.blocks.${type}`)} ${nodesWithSameType.length + 1}` : t(`workflow.blocks.${type}`),
@@ -80,11 +78,11 @@
        title={t('workflow.common.addBlock')}
      >
        <div className={cn(
          'flex h-8 w-8 cursor-pointer items-center justify-center rounded-lg text-text-tertiary hover:bg-state-base-hover hover:text-text-secondary',
          'flex items-center justify-center w-8 h-8 rounded-lg text-text-tertiary hover:bg-state-base-hover hover:text-text-secondary cursor-pointer',
          `${nodesReadOnly && 'cursor-not-allowed text-text-disabled hover:bg-transparent hover:text-text-disabled'}`,
          open && 'bg-state-accent-active text-text-accent',
        )}>
          <RiAddCircleFill className='h-4 w-4' />
          <RiAddCircleFill className='w-4 h-4' />
        </div>
      </TipPopup>
    )