From 2d7c43b60f584359ebffcb48f5508cc047dd5e42 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 2 Apr 2024 17:45:12 +0800 Subject: [PATCH] feat: http panel --- .../components/workflow/nodes/http/node.tsx | 36 ++++++------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/web/app/components/workflow/nodes/http/node.tsx b/web/app/components/workflow/nodes/http/node.tsx index 27ed4b6af6..9233f36b1a 100644 --- a/web/app/components/workflow/nodes/http/node.tsx +++ b/web/app/components/workflow/nodes/http/node.tsx @@ -1,40 +1,24 @@ import type { FC } from 'react' import React from 'react' -import { useTranslation } from 'react-i18next' -import cn from 'classnames' +import ReadonlyInputWithSelectVar from '../_base/components/readonly-input-with-select-var' import type { HttpNodeType } from './types' -import type { NodeProps, Var } from '@/app/components/workflow/types' -import useAvailableVarList from '@/app/components/workflow/nodes/_base/hooks/use-available-var-list' -import { VarType } from '@/app/components/workflow/types' -import Input from '@/app/components/workflow/nodes/_base/components/input-support-select-var' - +import type { NodeProps } from '@/app/components/workflow/types' const Node: FC> = ({ id, data, }) => { - const { t } = useTranslation() - const { method, url } = data - const availableVarList = useAvailableVarList(id, { - onlyLeafNodeVar: false, - filterVar: (varPayload: Var) => { - return [VarType.string, VarType.number].includes(varPayload.type) - }, - }) + return (
-
+
{method}
- { }} - readOnly - nodesOutputVars={availableVarList} - onFocusChange={() => { }} - placeholder={' '} - placeholderClassName='!leading-[21px]' - /> +
+ +
)