mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 20:48:01 +08:00
feat(workflow): enhance webhook status code input with increment/decrement controls (#25099)
This commit is contained in:
parent
2013ceb9d2
commit
33c867fd8c
@ -11,7 +11,7 @@ import Field from '@/app/components/workflow/nodes/_base/components/field'
|
|||||||
import Split from '@/app/components/workflow/nodes/_base/components/split'
|
import Split from '@/app/components/workflow/nodes/_base/components/split'
|
||||||
import type { NodePanelProps } from '@/app/components/workflow/types'
|
import type { NodePanelProps } from '@/app/components/workflow/types'
|
||||||
import InputWithCopy from '@/app/components/base/input-with-copy'
|
import InputWithCopy from '@/app/components/base/input-with-copy'
|
||||||
import Input from '@/app/components/base/input'
|
import { InputNumber } from '@/app/components/base/input-number'
|
||||||
import { SimpleSelect } from '@/app/components/base/select'
|
import { SimpleSelect } from '@/app/components/base/select'
|
||||||
import Toast from '@/app/components/base/toast'
|
import Toast from '@/app/components/base/toast'
|
||||||
import Tooltip from '@/app/components/base/tooltip'
|
import Tooltip from '@/app/components/base/tooltip'
|
||||||
@ -186,14 +186,18 @@ const Panel: FC<NodePanelProps<WebhookTriggerNodeType>> = ({
|
|||||||
<label className="system-sm-medium text-text-tertiary">
|
<label className="system-sm-medium text-text-tertiary">
|
||||||
{t(`${i18nPrefix}.statusCode`)}
|
{t(`${i18nPrefix}.statusCode`)}
|
||||||
</label>
|
</label>
|
||||||
<Input
|
<InputNumber
|
||||||
type="number"
|
|
||||||
value={inputs.status_code}
|
value={inputs.status_code}
|
||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => handleStatusCodeChange(Number(e.target.value))}
|
onChange={(value) => {
|
||||||
onBlur={(e: React.FocusEvent<HTMLInputElement>) => handleStatusCodeBlur(Number(e.target.value))}
|
handleStatusCodeChange(value || 200)
|
||||||
|
}}
|
||||||
disabled={readOnly}
|
disabled={readOnly}
|
||||||
wrapperClassName="w-[120px]"
|
wrapClassName="w-[120px]"
|
||||||
className="h-8"
|
className="h-8"
|
||||||
|
defaultValue={200}
|
||||||
|
onBlur={() => {
|
||||||
|
handleStatusCodeBlur(inputs.status_code)
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user