|
@@ -9,12 +9,9 @@ import AuthorizationModal from './components/authorization'
|
|
|
import type { HttpNodeType } from './types'
|
|
|
import Timeout from './components/timeout'
|
|
|
import CurlPanel from './components/curl-panel'
|
|
|
-import cn from '@/utils/classnames'
|
|
|
import Field from '@/app/components/workflow/nodes/_base/components/field'
|
|
|
import Split from '@/app/components/workflow/nodes/_base/components/split'
|
|
|
import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/components/output-vars'
|
|
|
-import { Settings01 } from '@/app/components/base/icons/src/vender/line/general'
|
|
|
-import { FileArrow01 } from '@/app/components/base/icons/src/vender/line/files'
|
|
|
import type { NodePanelProps } from '@/app/components/workflow/types'
|
|
|
import BeforeRunForm from '@/app/components/workflow/nodes/_base/components/before-run-form'
|
|
|
import ResultPanel from '@/app/components/workflow/run/result-panel'
|
|
@@ -69,33 +66,33 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({
|
|
|
<div className='space-y-4 px-4 pb-4'>
|
|
|
<Field
|
|
|
title={t(`${i18nPrefix}.api`)}
|
|
|
- operations={
|
|
|
- <div className='flex'>
|
|
|
- <div
|
|
|
- onClick={showAuthorization}
|
|
|
- className={cn(!readOnly && 'cursor-pointer hover:bg-gray-50', 'flex h-6 items-center space-x-1 rounded-md px-2 ')}
|
|
|
- >
|
|
|
- {!readOnly && <Settings01 className='h-3 w-3 text-gray-500' />}
|
|
|
- <div className='text-xs font-medium text-gray-500'>
|
|
|
- {t(`${i18nPrefix}.authorization.authorization`)}
|
|
|
- <span className='ml-1 text-gray-700'>{t(`${i18nPrefix}.authorization.${inputs.authorization.type}`)}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- onClick={showCurlPanel}
|
|
|
- className={cn(!readOnly && 'cursor-pointer hover:bg-gray-50', 'flex h-6 items-center space-x-1 rounded-md px-2 ')}
|
|
|
- >
|
|
|
- {!readOnly && <FileArrow01 className='h-3 w-3 text-gray-500' />}
|
|
|
- <div className='text-xs font-medium text-gray-500'>
|
|
|
- {t(`${i18nPrefix}.curl.title`)}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- }
|
|
|
+ // operations={
|
|
|
+ // <div className='flex'>
|
|
|
+ // <div
|
|
|
+ // onClick={showAuthorization}
|
|
|
+ // className={cn(!readOnly && 'cursor-pointer hover:bg-gray-50', 'flex h-6 items-center space-x-1 rounded-md px-2 ')}
|
|
|
+ // >
|
|
|
+ // {!readOnly && <Settings01 className='h-3 w-3 text-gray-500' />}
|
|
|
+ // <div className='text-xs font-medium text-gray-500'>
|
|
|
+ // {t(`${i18nPrefix}.authorization.authorization`)}
|
|
|
+ // <span className='ml-1 text-gray-700'>{t(`${i18nPrefix}.authorization.${inputs.authorization.type}`)}</span>
|
|
|
+ // </div>
|
|
|
+ // </div>
|
|
|
+ // <div
|
|
|
+ // onClick={showCurlPanel}
|
|
|
+ // className={cn(!readOnly && 'cursor-pointer hover:bg-gray-50', 'flex h-6 items-center space-x-1 rounded-md px-2 ')}
|
|
|
+ // >
|
|
|
+ // {!readOnly && <FileArrow01 className='h-3 w-3 text-gray-500' />}
|
|
|
+ // <div className='text-xs font-medium text-gray-500'>
|
|
|
+ // {t(`${i18nPrefix}.curl.title`)}
|
|
|
+ // </div>
|
|
|
+ // </div>
|
|
|
+ // </div>
|
|
|
+ // }
|
|
|
>
|
|
|
<ApiInput
|
|
|
nodeId={id}
|
|
|
- readonly={readOnly}
|
|
|
+ readonly={true}
|
|
|
method={inputs.method}
|
|
|
onMethodChange={handleMethodChange}
|
|
|
url={inputs.url}
|