mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 12:37:20 +08:00
feat: align trigger webhook style with schedule node and fix selection border truncation (#24635)
This commit is contained in:
parent
e53edb0fc2
commit
73e65fd838
@ -18,7 +18,11 @@ const Node: FC<NodeProps<ScheduleTriggerNodeType>> = ({
|
|||||||
{t(`${i18nPrefix}.nextExecutionTime`)}
|
{t(`${i18nPrefix}.nextExecutionTime`)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex h-[26px] items-center rounded-md bg-workflow-block-parma-bg px-2 text-xs text-text-secondary">
|
<div className="flex h-[26px] items-center rounded-md bg-workflow-block-parma-bg px-2 text-xs text-text-secondary">
|
||||||
{getNextExecutionTime(data)}
|
<div className="w-0 grow">
|
||||||
|
<div className="truncate" title={getNextExecutionTime(data)}>
|
||||||
|
{getNextExecutionTime(data)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import { BlockEnum } from '../../types'
|
|||||||
import type { NodeDefault } from '../../types'
|
import type { NodeDefault } from '../../types'
|
||||||
import type { WebhookTriggerNodeType } from './types'
|
import type { WebhookTriggerNodeType } from './types'
|
||||||
import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks'
|
import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks'
|
||||||
import { ErrorHandleTypeEnum } from '@/app/components/workflow/nodes/_base/components/error-handle/types'
|
|
||||||
import type { DefaultValueForm } from '@/app/components/workflow/nodes/_base/components/error-handle/types'
|
import type { DefaultValueForm } from '@/app/components/workflow/nodes/_base/components/error-handle/types'
|
||||||
|
|
||||||
const nodeDefault: NodeDefault<WebhookTriggerNodeType> = {
|
const nodeDefault: NodeDefault<WebhookTriggerNodeType> = {
|
||||||
@ -16,7 +15,6 @@ const nodeDefault: NodeDefault<WebhookTriggerNodeType> = {
|
|||||||
'async_mode': true,
|
'async_mode': true,
|
||||||
'status_code': 200,
|
'status_code': 200,
|
||||||
'response_body': '',
|
'response_body': '',
|
||||||
'error_strategy': ErrorHandleTypeEnum.defaultValue,
|
|
||||||
'default_value': [] as DefaultValueForm[],
|
'default_value': [] as DefaultValueForm[],
|
||||||
},
|
},
|
||||||
getAvailablePrevNodes(_isChatMode: boolean) {
|
getAvailablePrevNodes(_isChatMode: boolean) {
|
||||||
|
|||||||
@ -8,19 +8,16 @@ const Node: FC<NodeProps<WebhookTriggerNodeType>> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<div className="mb-1 px-3 py-1">
|
<div className="mb-1 px-3 py-1">
|
||||||
<div className="mb-1 text-xs text-text-secondary">
|
<div className="mb-1 text-[10px] font-medium uppercase tracking-wide text-text-tertiary">
|
||||||
URL
|
URL
|
||||||
</div>
|
</div>
|
||||||
{data.webhook_url && (
|
<div className="flex h-[26px] items-center rounded-md bg-workflow-block-parma-bg px-2 text-xs text-text-secondary">
|
||||||
<div
|
<div className="w-0 grow">
|
||||||
className="max-w-[200px] cursor-default truncate rounded bg-components-badge-bg-gray-soft px-2 py-1 text-xs text-text-tertiary"
|
<div className="truncate" title={data.webhook_url || '--'}>
|
||||||
title={data.webhook_url}
|
{data.webhook_url || '--'}
|
||||||
>
|
</div>
|
||||||
<span className="truncate" title={data.webhook_url}>
|
|
||||||
{data.webhook_url}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user