diff --git a/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx b/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx index afcb4ad50e0c71..57122c9ef1d887 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx @@ -1,6 +1,5 @@ -import { Fragment, useState } from 'react' +import { useState } from 'react' import type { FC } from 'react' -import { RiQuestionLine } from '@remixicon/react' import { ValidatingTip } from '../../key-validator/ValidateStatus' import type { CredentialFormSchema, @@ -68,28 +67,17 @@ const Form: FC = ({ onChange({ ...value, [key]: val, ...shouldClearVariable }) } - // convert tooltip '\n' to
- const renderTooltipContent = (content: string) => { - return content.split('\n').map((line, index, array) => ( - - {line} - {index < array.length - 1 &&
} -
- )) - } - const renderField = (formSchema: CredentialFormSchema) => { const tooltip = formSchema.tooltip const tooltipContent = (tooltip && ( - - - {renderTooltipContent(tooltip[language] || tooltip.en_US)} - - } > - - + + + {tooltip[language] || tooltip.en_US} + } + triggerClassName='w-4 h-4' + /> )) if (formSchema.type === FormTypeEnum.textInput || formSchema.type === FormTypeEnum.secretInput || formSchema.type === FormTypeEnum.textNumber) { const { @@ -106,7 +94,7 @@ const Form: FC = ({ const disabed = readonly || (isEditMode && (variable === '__model_type' || variable === '__model_name')) return (
-
+
{label[language] || label.en_US} { required && ( @@ -147,7 +135,7 @@ const Form: FC = ({ return (
-
+
{label[language] || label.en_US} { required && ( @@ -203,7 +191,7 @@ const Form: FC = ({ return (
-
+
{label[language] || label.en_US} { @@ -247,7 +235,7 @@ const Form: FC = ({
- {label[language] || label.en_US} + {label[language] || label.en_US} { required && ( *