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/panel.tsx | 27 ++++++++++++++++----------- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/app/components/workflow/nodes/http/panel.tsx b/app/components/workflow/nodes/http/panel.tsx index 60f3de8..91b3a61 100644 --- a/app/components/workflow/nodes/http/panel.tsx +++ b/app/components/workflow/nodes/http/panel.tsx @@ -18,6 +18,7 @@ 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' +import { useRetryDetailShowInSingleRun } from '@/app/components/workflow/nodes/_base/components/retry/hooks' const i18nPrefix = 'workflow.nodes.http' @@ -60,34 +61,37 @@ hideCurlPanel, handleCurlImport, } = useConfig(id, data) + const { + retryDetails, + handleRetryDetailsChange, + } = useRetryDetailShowInSingleRun() // To prevent prompt editor in body not update data. if (!isDataReady) return null return ( <div className='pt-2'> - <div className='space-y-4 px-4 pb-4'> + <div className='px-4 pb-4 space-y-4'> <Field title={t(`${i18nPrefix}.api`)} - required operations={ <div className='flex'> <div onClick={showAuthorization} - className={cn(!readOnly && 'cursor-pointer hover:bg-state-base-hover', 'flex h-6 items-center space-x-1 rounded-md px-2 ')} + className={cn(!readOnly && 'cursor-pointer hover:bg-gray-50', 'flex items-center h-6 space-x-1 px-2 rounded-md ')} > - {!readOnly && <Settings01 className='h-3 w-3 text-text-tertiary' />} - <div className='text-xs font-medium text-text-tertiary'> + {!readOnly && <Settings01 className='w-3 h-3 text-gray-500' />} + <div className='text-xs font-medium text-gray-500'> {t(`${i18nPrefix}.authorization.authorization`)} - <span className='ml-1 text-text-secondary'>{t(`${i18nPrefix}.authorization.${inputs.authorization.type}`)}</span> + <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-state-base-hover', 'flex h-6 items-center space-x-1 rounded-md px-2 ')} + className={cn(!readOnly && 'cursor-pointer hover:bg-gray-50', 'flex items-center h-6 space-x-1 px-2 rounded-md ')} > - {!readOnly && <FileArrow01 className='h-3 w-3 text-text-tertiary' />} - <div className='text-xs font-medium text-text-tertiary'> + {!readOnly && <FileArrow01 className='w-3 h-3 text-gray-500' />} + <div className='text-xs font-medium text-gray-500'> {t(`${i18nPrefix}.curl.title`)} </div> </div> @@ -127,7 +131,6 @@ </Field> <Field title={t(`${i18nPrefix}.body`)} - required > <EditBody nodeId={id} @@ -195,7 +198,9 @@ runningStatus={runningStatus} onRun={handleRun} onStop={handleStop} - result={<ResultPanel {...runResult} showSteps={false} />} + retryDetails={retryDetails} + onRetryDetailBack={handleRetryDetailsChange} + result={<ResultPanel {...runResult} showSteps={false} onShowRetryDetail={handleRetryDetailsChange} />} /> )} {(isShowCurlPanel && !readOnly) && ( -- Gitblit v1.8.0