feat: align trigger webhook style with schedule node and fix selection border truncation (#24635)

This commit is contained in:
lyzno1 2025-08-27 17:47:14 +08:00 committed by GitHub
parent e53edb0fc2
commit 73e65fd838
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 13 deletions

View File

@ -18,7 +18,11 @@ const Node: FC<NodeProps<ScheduleTriggerNodeType>> = ({
{t(`${i18nPrefix}.nextExecutionTime`)}
</div>
<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>
)

View File

@ -2,7 +2,6 @@ import { BlockEnum } from '../../types'
import type { NodeDefault } from '../../types'
import type { WebhookTriggerNodeType } from './types'
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'
const nodeDefault: NodeDefault<WebhookTriggerNodeType> = {
@ -16,7 +15,6 @@ const nodeDefault: NodeDefault<WebhookTriggerNodeType> = {
'async_mode': true,
'status_code': 200,
'response_body': '',
'error_strategy': ErrorHandleTypeEnum.defaultValue,
'default_value': [] as DefaultValueForm[],
},
getAvailablePrevNodes(_isChatMode: boolean) {

View File

@ -8,19 +8,16 @@ const Node: FC<NodeProps<WebhookTriggerNodeType>> = ({
}) => {
return (
<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
</div>
{data.webhook_url && (
<div
className="max-w-[200px] cursor-default truncate rounded bg-components-badge-bg-gray-soft px-2 py-1 text-xs text-text-tertiary"
title={data.webhook_url}
>
<span className="truncate" title={data.webhook_url}>
{data.webhook_url}
</span>
<div className="flex h-[26px] items-center rounded-md bg-workflow-block-parma-bg px-2 text-xs text-text-secondary">
<div className="w-0 grow">
<div className="truncate" title={data.webhook_url || '--'}>
{data.webhook_url || '--'}
</div>
</div>
)}
</div>
</div>
)
}