feat(workflow): update listening descriptions when trigger nodes start test-run

This commit is contained in:
zhsama 2025-10-24 15:32:23 +08:00
parent 4597ab4efb
commit 29ec3c7d5c
5 changed files with 21 additions and 5 deletions

View File

@ -21,7 +21,8 @@ const resolveListeningDescription = (
if (nodeDescription)
return nodeDescription
return t('workflow.debug.variableInspect.listening.tip')
const nodeName = (triggerNode?.data as { title?: string })?.title
return t('workflow.debug.variableInspect.listening.tip', { nodeName })
}
const resolveMultipleListeningDescription = (
@ -29,16 +30,16 @@ const resolveMultipleListeningDescription = (
t: TFunction,
): string => {
if (!nodes.length)
return t('workflow.debug.variableInspect.listening.tip')
return t('workflow.debug.variableInspect.listening.tip', { nodeName: t('workflow.debug.variableInspect.listening.selectedTriggers') })
const titles = nodes
.map(node => (node.data as { title?: string })?.title)
.filter((title): title is string => Boolean(title))
if (titles.length)
return titles.join(', ')
return t('workflow.debug.variableInspect.listening.tip', { nodeName: titles.join(', ') })
return t('workflow.debug.variableInspect.listening.tip')
return t('workflow.debug.variableInspect.listening.tip', { nodeName: t('workflow.debug.variableInspect.listening.selectedTriggers') })
}
export type ListeningProps = {

View File

@ -1224,7 +1224,7 @@ const translation = {
reset: 'Reset to last run value',
listening: {
title: 'Listening for events from triggers...',
tip: 'Now you can create events in Slack and Gmail, and retrieve outputs from these events in the Variable Inspector.',
tip: 'You can now simulate event triggers by sending test requests to HTTP {{nodeName}} endpoint or use it as a callback URL for live event debugging. All outputs can be viewed directly in the Variable Inspector.',
stopButton: 'Stop',
},
trigger: {

View File

@ -1166,6 +1166,11 @@ const translation = {
description: '最後の実行の結果がここに表示されます',
},
variableInspect: {
listening: {
title: 'トリガーからのイベントを待機中…',
tip: 'HTTP {{nodeName}} エンドポイントにテストリクエストを送信するか、ライブイベントデバッグ用のコールバック URL として利用してイベントトリガーをシミュレートできます。すべての出力は Variable Inspector で直接確認できます。',
stopButton: '停止',
},
trigger: {
clear: 'クリア',
running: 'キャッシング実行状況',

View File

@ -1195,6 +1195,11 @@ const translation = {
view: '查看记录',
edited: '已编辑',
reset: '还原至上一次运行',
listening: {
title: '正在监听触发器事件…',
tip: '您现在可以向 HTTP {{nodeName}} 端点发送测试请求以模拟事件触发,或将其用作实时事件调试的回调 URL。所有输出都可以在变量检查器中直接查看。',
stopButton: '停止',
},
trigger: {
normal: '变量检查',
running: '缓存中',

View File

@ -1004,6 +1004,11 @@ const translation = {
description: '上次運行的結果將顯示在這裡',
},
variableInspect: {
listening: {
title: '正在監聽觸發器事件…',
tip: '您現在可以向 HTTP {{nodeName}} 端點發送測試請求來模擬事件觸發,或將其作為即時事件除錯的回呼 URL。所有輸出都可在變數檢視器中直接查看。',
stopButton: '停止',
},
trigger: {
cached: '查看緩存的變量',
stop: '停止跑步',