feat: tooltip (#7634)

This commit is contained in:
Yi Xiao
2024-08-26 13:00:02 +08:00
committed by GitHub
parent 1ba3d3acd6
commit 3be756eaed
93 changed files with 640 additions and 758 deletions

View File

@@ -35,7 +35,7 @@ import {
useWorkflowHistory,
} from '@/app/components/workflow/hooks'
import { canRunBySingle } from '@/app/components/workflow/utils'
import TooltipPlus from '@/app/components/base/tooltip-plus'
import Tooltip from '@/app/components/base/tooltip'
import type { Node } from '@/app/components/workflow/types'
import { useStore as useAppStore } from '@/app/components/app/store'
import { useStore } from '@/app/components/workflow/store'
@@ -127,8 +127,9 @@ const BasePanel: FC<BasePanelProps> = ({
<div className='shrink-0 flex items-center text-gray-500'>
{
canRunBySingle(data.type) && !nodesReadOnly && (
<TooltipPlus
<Tooltip
popupContent={t('workflow.panel.runThisStep')}
popupClassName='mr-1'
>
<div
className='flex items-center justify-center mr-1 w-6 h-6 rounded-md hover:bg-black/5 cursor-pointer'
@@ -139,7 +140,7 @@ const BasePanel: FC<BasePanelProps> = ({
>
<RiPlayLargeLine className='w-4 h-4 text-text-tertiary' />
</div>
</TooltipPlus>
</Tooltip>
)
}
<HelpLink nodeType={data.type} />