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:
lyzno1 2025-09-26 20:28:59 +08:00
parent 6d4d25ee6f
commit 1aafe915e4
2 changed files with 7 additions and 1 deletions

View File

@ -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)
})

View File

@ -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'>