feat: introduce trigger functionality (#27644)

Signed-off-by: lyzno1 <yuanyouhuilyz@gmail.com>
Co-authored-by: Stream <Stream_2@qq.com>
Co-authored-by: lyzno1 <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: zhsama <torvalds@linux.do>
Co-authored-by: Harry <xh001x@hotmail.com>
Co-authored-by: lyzno1 <yuanyouhuilyz@gmail.com>
Co-authored-by: yessenia <yessenia.contact@gmail.com>
Co-authored-by: hjlarry <hjlarry@163.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: WTW0313 <twwu@dify.ai>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Yeuoly
2025-11-12 17:59:37 +08:00
committed by GitHub
parent ca7794305b
commit b76e17b25d
785 changed files with 41186 additions and 3725 deletions

View File

@@ -28,6 +28,7 @@ type Props = {
inputs?: InputVar[]
handlePublish: (params?: PublishWorkflowParams) => Promise<void>
onRefreshData?: () => void
disabledReason?: string
}
const WorkflowToolConfigureButton = ({
@@ -41,6 +42,7 @@ const WorkflowToolConfigureButton = ({
inputs,
handlePublish,
onRefreshData,
disabledReason,
}: Props) => {
const { t } = useTranslation()
const router = useRouter()
@@ -200,7 +202,8 @@ const WorkflowToolConfigureButton = ({
{t('workflow.common.configureRequired')}
</span>
)}
</div>)
</div>
)
: (
<div
className='flex items-center justify-start gap-2 p-2 pl-2.5'
@@ -214,6 +217,11 @@ const WorkflowToolConfigureButton = ({
</div>
</div>
)}
{disabledReason && (
<div className='mt-1 px-2.5 pb-2 text-xs leading-[18px] text-text-tertiary'>
{disabledReason}
</div>
)}
{published && (
<div className='border-t-[0.5px] border-divider-regular px-2.5 py-2'>
<div className='flex justify-between gap-x-2'>
@@ -221,7 +229,7 @@ const WorkflowToolConfigureButton = ({
size='small'
className='w-[140px]'
onClick={() => setShowModal(true)}
disabled={!isCurrentWorkspaceManager}
disabled={!isCurrentWorkspaceManager || disabled}
>
{t('workflow.common.configure')}
{outdated && <Indicator className='ml-1' color={'yellow'} />}
@@ -230,14 +238,17 @@ const WorkflowToolConfigureButton = ({
size='small'
className='w-[140px]'
onClick={() => router.push('/tools?category=workflow')}
disabled={disabled}
>
{t('workflow.common.manageInTools')}
<RiArrowRightUpLine className='ml-1 h-4 w-4' />
</Button>
</div>
{outdated && <div className='mt-1 text-xs leading-[18px] text-text-warning'>
{t('workflow.common.workflowAsToolTip')}
</div>}
{outdated && (
<div className='mt-1 text-xs leading-[18px] text-text-warning'>
{t('workflow.common.workflowAsToolTip')}
</div>
)}
</div>
)}
</div>