mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
fix: missing key for translation path (#25059)
This commit is contained in:
@ -68,7 +68,12 @@ const StartBlocks = ({
|
||||
className='mb-2'
|
||||
type={block.type}
|
||||
/>
|
||||
<div className='system-md-medium mb-1 text-text-primary'>{block.title}</div>
|
||||
<div className='system-md-medium mb-1 text-text-primary'>
|
||||
{block.type === BlockEnumValues.TriggerWebhook
|
||||
? t('workflow.customWebhook')
|
||||
: t(`workflow.blocks.${block.type}`)
|
||||
}
|
||||
</div>
|
||||
<div className='system-xs-regular text-text-secondary'>{nodesExtraData[block.type].about}</div>
|
||||
{(block.type === BlockEnumValues.TriggerWebhook || block.type === BlockEnumValues.TriggerSchedule) && (
|
||||
<div className='system-xs-regular mb-1 mt-1 text-text-tertiary'>
|
||||
@ -87,7 +92,7 @@ const StartBlocks = ({
|
||||
type={block.type}
|
||||
/>
|
||||
<div className='flex w-0 grow items-center justify-between text-sm text-text-secondary'>
|
||||
<span className='truncate'>{block.title}</span>
|
||||
<span className='truncate'>{t(`workflow.blocks.${block.type}`)}</span>
|
||||
{block.type === BlockEnumValues.Start && (
|
||||
<span className='system-xs-regular ml-2 shrink-0 text-text-quaternary'>{t('workflow.blocks.originalStartNode')}</span>
|
||||
)}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import type { ScheduleTriggerNodeType } from './types'
|
||||
|
||||
// Unified default values for trigger schedule
|
||||
export const getDefaultScheduleConfig = (): Partial<ScheduleTriggerNodeType> => ({
|
||||
mode: 'visual',
|
||||
frequency: 'weekly',
|
||||
|
||||
@ -5,16 +5,16 @@ export type ScheduleMode = 'visual' | 'cron'
|
||||
export type ScheduleFrequency = 'hourly' | 'daily' | 'weekly' | 'monthly'
|
||||
|
||||
export type VisualConfig = {
|
||||
time?: string // User timezone time format: "2:30 PM"
|
||||
weekdays?: string[] // ['mon', 'tue', 'wed'] for weekly frequency
|
||||
on_minute?: number // 0-59 for hourly frequency
|
||||
monthly_days?: (number | 'last')[] // [1, 15, 'last'] for monthly frequency
|
||||
time?: string
|
||||
weekdays?: string[]
|
||||
on_minute?: number
|
||||
monthly_days?: (number | 'last')[]
|
||||
}
|
||||
|
||||
export type ScheduleTriggerNodeType = CommonNodeType & {
|
||||
mode: ScheduleMode // 'visual' or 'cron' configuration mode
|
||||
frequency: ScheduleFrequency // 'hourly' | 'daily' | 'weekly' | 'monthly'
|
||||
cron_expression?: string // Cron expression when mode is 'cron'
|
||||
visual_config?: VisualConfig // User-friendly configuration when mode is 'visual'
|
||||
timezone: string // User profile timezone (e.g., 'Asia/Shanghai', 'America/New_York')
|
||||
mode: ScheduleMode
|
||||
frequency: ScheduleFrequency
|
||||
cron_expression?: string
|
||||
visual_config?: VisualConfig
|
||||
timezone: string
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ const nodeDefault: NodeDefault<WebhookTriggerNodeType> = {
|
||||
if (!payload.webhook_url) {
|
||||
return {
|
||||
isValid: false,
|
||||
errorMessage: t('workflow.nodes.webhook.validation.webhookUrlRequired'),
|
||||
errorMessage: t('workflow.nodes.triggerWebhook.validation.webhookUrlRequired'),
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ const nodeDefault: NodeDefault<WebhookTriggerNodeType> = {
|
||||
if (!isValidParameterType(param.type)) {
|
||||
return {
|
||||
isValid: false,
|
||||
errorMessage: t('workflow.nodes.webhook.validation.invalidParameterType', {
|
||||
errorMessage: t('workflow.nodes.triggerWebhook.validation.invalidParameterType', {
|
||||
name: param.name,
|
||||
type: param.type,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user