From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001
From: wwf <yearningwang@iqtogether.com>
Date: 星期三, 04 六月 2025 15:17:49 +0800
Subject: [PATCH] 初始化

---
 app/components/workflow/nodes/http/components/curl-panel.tsx |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/app/components/workflow/nodes/http/components/curl-panel.tsx b/app/components/workflow/nodes/http/components/curl-panel.tsx
index 52e28d7..9c5ddde 100644
--- a/app/components/workflow/nodes/http/components/curl-panel.tsx
+++ b/app/components/workflow/nodes/http/components/curl-panel.tsx
@@ -5,7 +5,6 @@
 import { BodyType, type HttpNodeType, Method } from '../types'
 import Modal from '@/app/components/base/modal'
 import Button from '@/app/components/base/button'
-import Textarea from '@/app/components/base/textarea'
 import Toast from '@/app/components/base/toast'
 import { useNodesInteractions } from '@/app/components/workflow/hooks'
 
@@ -23,14 +22,13 @@
   const node: Partial<HttpNodeType> = {
     title: 'HTTP Request',
     desc: 'Imported from cURL',
-    method: undefined,
+    method: Method.get,
     url: '',
     headers: '',
     params: '',
     body: { type: BodyType.none, data: '' },
   }
   const args = curlCommand.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g) || []
-  let hasData = false
 
   for (let i = 1; i < args.length; i++) {
     const arg = args[i].replace(/^['"]|['"]$/g, '')
@@ -40,7 +38,6 @@
         if (i + 1 >= args.length)
           return { node: null, error: 'Missing HTTP method after -X or --request.' }
         node.method = (args[++i].replace(/^['"]|['"]$/g, '') as Method) || Method.get
-        hasData = true
         break
       case '-H':
       case '--header':
@@ -92,9 +89,6 @@
     }
   }
 
-  // Determine final method
-  node.method = node.method || (hasData ? Method.post : Method.get)
-
   if (!node.url)
     return { node: null, error: 'Missing URL or url not start with http.' }
 
@@ -142,9 +136,9 @@
       className='!w-[400px] !max-w-[400px] !p-4'
     >
       <div>
-        <Textarea
+        <textarea
           value={inputString}
-          className='my-3 h-40 w-full grow'
+          className='w-full my-3 p-3 text-sm text-gray-900 border-0 rounded-lg grow bg-gray-100 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200 h-40'
           onChange={e => setInputString(e.target.value)}
           placeholder={t('workflow.nodes.http.curl.placeholder')!}
         />

--
Gitblit v1.8.0