This commit is contained in:
zxhlyh 2025-07-15 18:03:27 +08:00
parent e4cf6a497b
commit 67b5d73399
1 changed files with 4 additions and 4 deletions

View File

@ -63,7 +63,7 @@ const ApiKeyModal = ({
acc[schema.name] = schema.default
return acc
}, {} as Record<string, any>)
const secretInput = formSchemas.find(schema => schema.type === FormTypeEnum.secretInput)
const helpField = formSchemas.find(schema => schema.url && schema.help)
const renderI18nObject = useRenderI18nObject()
const { mutateAsync: addPluginCredential } = useAddPluginCredentialHook(pluginPayload)
const { mutateAsync: updatePluginCredential } = useUpdatePluginCredentialHook(pluginPayload)
@ -125,13 +125,13 @@ const ApiKeyModal = ({
onClose={onClose}
onCancel={onClose}
footerSlot={
secretInput && (
helpField && (
<a
className='system-xs-regular flex h-8 grow items-center text-text-accent'
href={secretInput?.url}
href={helpField?.url}
target='_blank'
>
{renderI18nObject(secretInput?.help as any)}
{renderI18nObject(helpField?.help as any)}
<RiExternalLinkLine className='ml-1 h-3 w-3' />
</a>
)