mirror of https://github.com/langgenius/dify.git
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`)}
|
||||
</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>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue