fix(style): unify casing of system terms

This commit is contained in:
jialin
2025-04-08 13:28:13 +08:00
parent a087677c6e
commit f6bc183972
19 changed files with 109 additions and 69 deletions
@@ -21,6 +21,7 @@ import { CheckboxChangeEvent } from 'antd/es/checkbox';
import _ from 'lodash';
import React, { useCallback, useMemo } from 'react';
import {
backendLabelMap,
backendOptionsMap,
backendParamsHolderTips,
modelCategories,
@@ -327,7 +328,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
id: 'models.form.backendVersion.tips'
},
{
backend: backend,
backend: backendLabelMap[backend],
link: backendParamsTips?.releases && (
<span
style={{
@@ -336,7 +337,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
>
<Typography.Link
className="flex-center"
style={{ lineHeight: 1 }}
style={{ display: 'inline' }}
href={backendParamsTips?.releases}
target="_blank"
>
@@ -375,12 +376,13 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
options={paramsConfig}
description={
backendParamsTips && (
<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"
@@ -85,7 +85,8 @@ const CompatibilityAlert: React.FC<CompatibilityAlertProps> = (props) => {
}, [type]);
return (
show && (
show &&
!!message && (
<DivWrapper>
<AlertBlockInfo
ellipsis={false}
+5 -4
View File
@@ -9,6 +9,7 @@ import { Form } from 'antd';
import _ from 'lodash';
import React, { forwardRef, useImperativeHandle } from 'react';
import {
backendLabelMap,
backendOptionsMap,
backendTipsList,
excludeFields,
@@ -259,7 +260,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
options={
backendOptions ?? [
{
label: `llama-box`,
label: backendLabelMap[backendOptionsMap.llamaBox],
value: backendOptionsMap.llamaBox,
disabled:
props.source === modelSourceMap.local_path_value
@@ -267,7 +268,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
: !isGGUF
},
{
label: 'vLLM',
label: backendLabelMap[backendOptionsMap.vllm],
value: backendOptionsMap.vllm,
disabled:
props.source === modelSourceMap.local_path_value
@@ -275,7 +276,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
: isGGUF
},
{
label: 'Ascend Mindie',
label: backendLabelMap[backendOptionsMap.ascendMindie],
value: backendOptionsMap.ascendMindie,
disabled:
props.source === modelSourceMap.local_path_value
@@ -283,7 +284,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
: isGGUF
},
{
label: 'vox-box',
label: backendLabelMap[backendOptionsMap.voxBox],
value: backendOptionsMap.voxBox,
disabled:
props.source === modelSourceMap.local_path_value
@@ -10,6 +10,7 @@ import React, {
useRef,
useState
} from 'react';
import styled from 'styled-components';
import {
evaluationsModelSpec,
queryHuggingfaceModels,
@@ -26,6 +27,12 @@ import SearchStyle from '../style/search-result.less';
import SearchInput from './search-input';
import SearchResult from './search-result';
const UL = styled.ul`
list-style: decimal;
padding-left: 16px;
margin: 0;
`;
interface SearchInputProps {
hasLinuxWorker?: boolean;
modelSource: string;
@@ -315,7 +322,7 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
<Tooltip
overlayInnerStyle={{ width: 'max-content' }}
title={
<ul className="tips-desc-list">
<UL>
<li>{intl.formatMessage({ id: 'models.search.gguf.tips' })}</li>
<li>{intl.formatMessage({ id: 'models.search.vllm.tips' })}</li>
<li>
@@ -323,7 +330,7 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
id: 'models.search.voxbox.tips'
})}
</li>
</ul>
</UL>
}
>
GGUF
@@ -12,6 +12,7 @@ import { Button, Form, Modal, Typography } from 'antd';
import _ from 'lodash';
import React, { useEffect, useMemo, useRef } from 'react';
import {
backendLabelMap,
backendOptionsMap,
backendTipsList,
excludeFields,
@@ -504,7 +505,7 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
description={<TooltipList list={backendTipsList}></TooltipList>}
options={[
{
label: `llama-box`,
label: backendLabelMap[backendOptionsMap.llamaBox],
value: backendOptionsMap.llamaBox,
disabled:
formData?.source === modelSourceMap.local_path_value
@@ -512,7 +513,7 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
: !isGGUF
},
{
label: 'vLLM',
label: backendLabelMap[backendOptionsMap.vllm],
value: backendOptionsMap.vllm,
disabled:
formData?.source === modelSourceMap.local_path_value
@@ -520,7 +521,7 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
: isGGUF
},
{
label: 'Ascend Mindie',
label: backendLabelMap[backendOptionsMap.ascendMindie],
value: backendOptionsMap.ascendMindie,
disabled:
formData?.source === modelSourceMap.local_path_value
@@ -528,7 +529,7 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
: isGGUF
},
{
label: 'vox-box',
label: backendLabelMap[backendOptionsMap.voxBox],
value: backendOptionsMap.voxBox,
disabled:
formData?.source === modelSourceMap.local_path_value