mirror of https://github.com/langgenius/dify.git
fix: trigger tooltip descriptions and filter trigger types from Nodes tab
- Fix trigger tooltip descriptions to use workflow.blocksAbout translations - Filter TriggerWebhook/TriggerSchedule/TriggerPlugin from Blocks component - Ensure trigger types only appear in Start tab, not Nodes tab
This commit is contained in:
parent
6d4d25ee6f
commit
1aafe915e4
|
|
@ -49,6 +49,12 @@ const Blocks = ({
|
|||
return BLOCK_CLASSIFICATIONS.reduce((acc, classification) => {
|
||||
const grouped = groupBy(blocks, 'metaData.classification')
|
||||
const list = (grouped[classification] || []).filter((block) => {
|
||||
// Filter out trigger types from Blocks tab
|
||||
if (block.metaData.type === BlockEnum.TriggerWebhook
|
||||
|| block.metaData.type === BlockEnum.TriggerSchedule
|
||||
|| block.metaData.type === BlockEnum.TriggerPlugin)
|
||||
return false
|
||||
|
||||
return block.metaData.title.toLowerCase().includes(searchText.toLowerCase()) && availableBlocksTypes.includes(block.metaData.type)
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ const StartBlocks = ({
|
|||
}
|
||||
</div>
|
||||
<div className='system-xs-regular text-text-secondary'>
|
||||
{block.description || availableNodesMetaData.nodesMap?.[block.type]?.description}
|
||||
{t(`workflow.blocksAbout.${block.type}`)}
|
||||
</div>
|
||||
{(block.type === BlockEnumValues.TriggerWebhook || block.type === BlockEnumValues.TriggerSchedule) && (
|
||||
<div className='system-xs-regular mb-1 mt-1 text-text-tertiary'>
|
||||
|
|
|
|||
Loading…
Reference in New Issue