style: adjust some styles

This commit is contained in:
jialin
2025-11-21 12:16:49 +08:00
parent 26a4d5474d
commit 19babbc73d
30 changed files with 126 additions and 130 deletions
@@ -198,7 +198,7 @@ const AccessControlForm = forwardRef((props: AccessControlFormProps, ref) => {
checked={filterInUsers.has('inactive')}
onChange={(e: any) => handleCheck(e, 'inactive')}
>
{intl.formatMessage({ id: 'users.status.deactivate' })}
{intl.formatMessage({ id: 'users.status.inactiveAccount' })}
</Checkbox>
),
key: '1'
@@ -1,5 +1,6 @@
import ModalFooter from '@/components/modal-footer';
import ScrollerModal from '@/components/scroller-modal';
import { PageActionType } from '@/config/types';
import { useIntl } from '@umijs/max';
import { message } from 'antd';
import { useRef } from 'react';
@@ -53,7 +54,7 @@ const AccessControlModal: React.FC<
<AccessControlForm
ref={form}
currentData={currentData}
action={action}
action={action as PageActionType}
onFinish={handleOnFinish}
/>
</ScrollerModal>
@@ -168,7 +168,7 @@ const ApiAccessInfo = ({ open, data, onClose }: ApiAccessInfoProps) => {
{intl.formatMessage({ id: 'models.table.apiAccessInfo.endpoint' })}
</span>
<span className="value">
<AutoTooltip ghost maxWidth={data.generic_proxy ? 400 : 180}>
<AutoTooltip ghost maxWidth={data.generic_proxy ? 400 : 240}>
{endPoint}
</AutoTooltip>
{!data.generic_proxy && (
+5 -5
View File
@@ -49,6 +49,11 @@ export const ActionList: ActionItem[] = [
key: 'chat',
icon: icons.ExperimentOutlined
},
{
label: 'common.button.start',
key: 'start',
icon: icons.Play
},
{
label: 'models.table.button.apiAccessInfo',
key: 'api',
@@ -64,11 +69,6 @@ export const ActionList: ActionItem[] = [
key: 'stop',
icon: icons.Stop
},
{
label: 'common.button.start',
key: 'start',
icon: icons.Play
},
{
label: 'common.button.delete',
key: 'delete',
+1 -1
View File
@@ -291,9 +291,9 @@ export const modelCategoriesMap = {
export const categoryOptions = [
{ label: 'LLM', value: modelCategoriesMap.llm },
{ label: 'Image', value: modelCategoriesMap.image },
{ label: 'Embedding', value: modelCategoriesMap.embedding },
{ label: 'Reranker', value: modelCategoriesMap.reranker },
{ label: 'Image', value: modelCategoriesMap.image },
{ label: 'Text-to-Speech', value: modelCategoriesMap.text_to_speech },
{ label: 'Speech-to-Text', value: modelCategoriesMap.speech_to_text }
];
@@ -1,7 +1,6 @@
import IconFont from '@/components/icon-font';
import ListInput from '@/components/list-input';
import { useIntl } from '@umijs/max';
import { Form, Typography } from 'antd';
import { Form } from 'antd';
import _ from 'lodash';
import { useMemo } from 'react';
import { backendParamsHolderTips, getBackendParamsTips } from '../config';
@@ -64,24 +63,20 @@ const BackendParametersList: React.FC = () => {
{intl.formatMessage({ id: 'models.backend.mindie.310p' })}
</span>
)}
<span style={{ marginLeft: 5 }}>
{intl.formatMessage(
{ id: 'models.form.backend_parameters.vllm.tips' },
{ backend: backendParamsTips.backend || '' }
)}{' '}
<Typography.Link
style={{ display: 'inline' }}
className="flex-center"
href={backendParamsTips.link}
target="_blank"
>
<span>{intl.formatMessage({ id: 'common.text.here' })}</span>
<IconFont
type="icon-external-link"
className="font-size-14 m-l-4"
></IconFont>
</Typography.Link>
</span>
<span
style={{
marginLeft: backend === backendOptionsMap.ascendMindie ? 4 : 0
}}
dangerouslySetInnerHTML={{
__html: intl.formatMessage(
{ id: 'models.form.backend_parameters.vllm.tips' },
{
backend: backendParamsTips.backend || '',
link: backendParamsTips.link
}
)
}}
></span>
</span>
)
}
+2 -45
View File
@@ -1,15 +1,10 @@
import IconFont from '@/components/icon-font';
import SealSelect from '@/components/seal-form/seal-select';
import TooltipList from '@/components/tooltip-list';
import useAppUtils from '@/hooks/use-app-utils';
import { useIntl } from '@umijs/max';
import { Form, Typography } from 'antd';
import { Form } from 'antd';
import React, { useMemo } from 'react';
import {
backendLabelMap,
backendTipsList,
getBackendParamsTips
} from '../config';
import { backendTipsList } from '../config';
import { backendOptionsMap } from '../config/backend-parameters';
import { useFormContext } from '../config/form-context';
@@ -21,14 +16,9 @@ const BackendFields: React.FC = () => {
const backend = Form.useWatch('backend', form);
const handleBackendVersionOnChange = (value: any) => {
console.log('value changed:', value);
onValuesChange?.({}, form.getFieldsValue());
};
const backendParamsTips = useMemo(() => {
return getBackendParamsTips(backend);
}, [backend]);
const backendGroupedOptions = useMemo(() => {
const builtInBackends = backendOptions?.filter(
(item) => item.isBuiltIn || item.value === backendOptionsMap.custom
@@ -138,39 +128,6 @@ const BackendFields: React.FC = () => {
})}
onChange={handleBackendVersionOnChange}
label={intl.formatMessage({ id: 'models.form.backendVersion' })}
description={intl.formatMessage(
{
id: 'models.form.backendVersion.tips'
},
{
backend: backendLabelMap[backend],
version: backendParamsTips?.version
? `(${intl.formatMessage({ id: 'common.help.eg' }, { content: '' })} ${backendParamsTips?.version})`
: '',
link: backendParamsTips?.releases && (
<span
style={{
marginLeft: 5
}}
>
<Typography.Link
className="flex-center"
style={{ display: 'inline' }}
href={backendParamsTips?.releases}
target="_blank"
>
<span>
{intl.formatMessage({ id: 'models.form.releases' })}
</span>
<IconFont
type="icon-external-link"
className="font-size-14 m-l-4"
></IconFont>
</Typography.Link>
</span>
)
}
)}
></SealSelect>
</Form.Item>
)}
+1 -1
View File
@@ -154,7 +154,7 @@ const UserModels: React.FC = () => {
return MyModelsStatusValueMap.Degrade;
}
if (model.replicas === model.ready_replicas && model.replicas > 0) {
if (model.ready_replicas > 0 && model.replicas > 0) {
return MyModelsStatusValueMap.Active;
}
return MyModelsStatusValueMap.Degrade;