11import MyModal from '@fastgpt/web/components/common/MyModal' ;
2- import React , { useEffect , useMemo , useState } from 'react' ;
2+ import React , { useMemo , useState } from 'react' ;
33import { useTranslation } from 'next-i18next' ;
44import {
55 Box ,
@@ -26,7 +26,6 @@ import { useContextSelector } from 'use-context-selector';
2626import { AppContext } from '../context' ;
2727import HttpInput from '@fastgpt/web/components/common/Input/HttpInput' ;
2828import MyIcon from '@fastgpt/web/components/common/Icon' ;
29- import type { OpenApiJsonSchema } from '@fastgpt/global/core/app/httpTools/type' ;
3029import { pathData2ToolList } from '@fastgpt/global/core/app/httpTools/utils' ;
3130import { FlowNodeTypeEnum } from '@fastgpt/global/core/workflow/node/constant' ;
3231import { str2OpenApiSchema } from '@fastgpt/global/core/app/jsonschema' ;
@@ -36,7 +35,7 @@ import {
3635} from '@/components/common/secret/HeaderAuthConfig' ;
3736import HeaderAuthForm from '@/components/common/secret/HeaderAuthForm' ;
3837
39- const ConfigModal = ( { onClose } : { onClose : ( ) => void } ) => {
38+ const SchemaConfigModal = ( { onClose } : { onClose : ( ) => void } ) => {
4039 const { t } = useTranslation ( ) ;
4140 const { toast } = useToast ( ) ;
4241
@@ -180,6 +179,20 @@ const ConfigModal = ({ onClose }: { onClose: () => void }) => {
180179 />
181180 </ Box >
182181
182+ < Box mt = { 6 } mb = { 2 } color = { 'myGray.900' } fontSize = { '14px' } fontWeight = { 'medium' } >
183+ { t ( 'common:auth_config' ) }
184+ </ Box >
185+ < Box mt = { 2 } >
186+ < HeaderAuthForm
187+ headerSecretValue = { storeHeader2HeaderValue ( headerSecret ) }
188+ onChange = { ( data ) => {
189+ const storeData = headerValue2StoreHeader ( data ) ;
190+ setValue ( 'headerSecret' , storeData ) ;
191+ } }
192+ fontWeight = "normal"
193+ />
194+ </ Box >
195+
183196 < Box mt = { 6 } mb = { 2 } color = { 'myGray.900' } fontSize = { '14px' } fontWeight = { 'medium' } >
184197 { t ( 'app:request_headers' ) }
185198 </ Box >
@@ -296,20 +309,6 @@ const ConfigModal = ({ onClose }: { onClose: () => void }) => {
296309 </ Table >
297310 </ TableContainer >
298311 </ Box >
299-
300- < Box mt = { 6 } mb = { 2 } color = { 'myGray.900' } fontSize = { '14px' } fontWeight = { 'medium' } >
301- { t ( 'common:auth_config' ) }
302- </ Box >
303- < Box mt = { 2 } >
304- < HeaderAuthForm
305- headerSecretValue = { storeHeader2HeaderValue ( headerSecret ) }
306- onChange = { ( data ) => {
307- const storeData = headerValue2StoreHeader ( data ) ;
308- setValue ( 'headerSecret' , storeData ) ;
309- } }
310- fontWeight = "normal"
311- />
312- </ Box >
313312 </ ModalBody >
314313
315314 < ModalFooter px = { 9 } display = { 'flex' } flexDirection = { 'column' } >
@@ -330,4 +329,4 @@ const ConfigModal = ({ onClose }: { onClose: () => void }) => {
330329 ) ;
331330} ;
332331
333- export default React . memo ( ConfigModal ) ;
332+ export default React . memo ( SchemaConfigModal ) ;
0 commit comments