fix: update open playground btn

This commit is contained in:
jialin
2026-02-05 11:55:05 +08:00
parent 4e8b5e26ae
commit a1a7979fb3
18 changed files with 302 additions and 218 deletions
+34 -27
View File
@@ -1,6 +1,7 @@
import LabelSelector from '@/components/label-selector';
import CheckboxField from '@/components/seal-form/checkbox-field';
import SealSelect from '@/components/seal-form/seal-select';
import { PageAction } from '@/config';
import { useIntl } from '@umijs/max';
import { Form } from 'antd';
import _ from 'lodash';
@@ -19,6 +20,8 @@ const AdvanceConfig = () => {
const modelRouteEnable = Form.useWatch('enable_model_route', form);
const {
onValuesChange,
realAction,
action,
backendOptions,
flatBackendOptions,
isGGUF,
@@ -133,33 +136,37 @@ const AdvanceConfig = () => {
})}
></CheckboxField>
</Form.Item>
<Form.Item<FormData>
name="enable_model_route"
valuePropName="checked"
style={{ marginBottom: 8 }}
>
<CheckboxField
label={intl.formatMessage({
id: 'models.form.enableModelRoute'
})}
></CheckboxField>
</Form.Item>
{modelRouteEnable && (
<Form.Item<FormData>
name="generic_proxy"
valuePropName="checked"
style={{ marginBottom: 8 }}
>
<CheckboxField
description={intl.formatMessage({
id: 'models.form.generic_proxy.tips'
})}
label={intl.formatMessage({
id: 'models.form.generic_proxy'
})}
></CheckboxField>
</Form.Item>
)}
{realAction === PageAction.COPY || action === PageAction.CREATE ? (
<>
<Form.Item<FormData>
name="enable_model_route"
valuePropName="checked"
style={{ marginBottom: 8 }}
>
<CheckboxField
label={intl.formatMessage({
id: 'models.form.enableModelRoute'
})}
></CheckboxField>
</Form.Item>
{modelRouteEnable && (
<Form.Item<FormData>
name="generic_proxy"
valuePropName="checked"
style={{ marginBottom: 8 }}
>
<CheckboxField
description={intl.formatMessage({
id: 'models.form.generic_proxy.tips'
})}
label={intl.formatMessage({
id: 'models.form.generic_proxy'
})}
></CheckboxField>
</Form.Item>
)}
</>
) : null}
</>
);
};
+3
View File
@@ -50,6 +50,7 @@ interface DataFormProps {
ref?: any;
source: SourceType;
action: PageActionType;
realAction?: PageActionType;
isGGUF: boolean;
formKey: DeployFormKey;
sourceDisable?: boolean;
@@ -77,6 +78,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
isGGUF,
formKey,
source,
realAction,
initialValues,
sourceDisable = true,
sourceList,
@@ -392,6 +394,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
formKey: formKey,
source: props.source,
action: action,
realAction: realAction,
gpuOptions: gpuOptions,
backendOptions: backendOptions,
flatBackendOptions: flatBackendOptions,