style: model list type tag
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: iconfont; /* Project id 4613488 */
|
font-family: iconfont; /* Project id 4613488 */
|
||||||
src:
|
src:
|
||||||
url('iconfont.woff2?t=1732806927800') format('woff2'),
|
url('iconfont.woff2?t=1734062014514') format('woff2'),
|
||||||
url('iconfont.woff?t=1732806927800') format('woff'),
|
url('iconfont.woff?t=1734062014514') format('woff'),
|
||||||
url('iconfont.ttf?t=1732806927800') format('truetype');
|
url('iconfont.ttf?t=1734062014514') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
@@ -14,6 +14,22 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-sound-wave::before {
|
||||||
|
content: '\e619';
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-rank1::before {
|
||||||
|
content: '\e7cb';
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-cube::before {
|
||||||
|
content: '\e769';
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-speaker-slash::before {
|
||||||
|
content: '\ebb6';
|
||||||
|
}
|
||||||
|
|
||||||
.icon-random::before {
|
.icon-random::before {
|
||||||
content: '\e603';
|
content: '\e603';
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,6 +5,34 @@
|
|||||||
"css_prefix_text": "icon-",
|
"css_prefix_text": "icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"icon_id": "14464883",
|
||||||
|
"name": "sound-wave",
|
||||||
|
"font_class": "sound-wave",
|
||||||
|
"unicode": "e619",
|
||||||
|
"unicode_decimal": 58905
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "37200543",
|
||||||
|
"name": "rank",
|
||||||
|
"font_class": "rank1",
|
||||||
|
"unicode": "e7cb",
|
||||||
|
"unicode_decimal": 59339
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "5127275",
|
||||||
|
"name": "cube",
|
||||||
|
"font_class": "cube",
|
||||||
|
"unicode": "e769",
|
||||||
|
"unicode_decimal": 59241
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "28326047",
|
||||||
|
"name": "speaker-slash",
|
||||||
|
"font_class": "speaker-slash",
|
||||||
|
"unicode": "ebb6",
|
||||||
|
"unicode_decimal": 60342
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "13059398",
|
"icon_id": "13059398",
|
||||||
"name": "随机",
|
"name": "随机",
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,8 @@
|
|||||||
import { createFromIconfontCN } from '@ant-design/icons';
|
import { createFromIconfontCN } from '@ant-design/icons';
|
||||||
// import './iconfont/iconfont.js';
|
import './iconfont/iconfont.js';
|
||||||
|
|
||||||
const IconFont = createFromIconfontCN({
|
const IconFont = createFromIconfontCN({
|
||||||
scriptUrl: '//at.alicdn.com/t/c/font_4613488_oyisgn7lqa.js'
|
scriptUrl: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
export default IconFont;
|
export default IconFont;
|
||||||
|
|||||||
@@ -195,7 +195,12 @@ const APIKeys: React.FC = () => {
|
|||||||
onClick={handleDeleteBatch}
|
onClick={handleDeleteBatch}
|
||||||
disabled={!rowSelection.selectedRowKeys.length}
|
disabled={!rowSelection.selectedRowKeys.length}
|
||||||
>
|
>
|
||||||
{intl.formatMessage({ id: 'common.button.delete' })}
|
<span>
|
||||||
|
{intl?.formatMessage?.({ id: 'common.button.delete' })}
|
||||||
|
{rowSelection.selectedRowKeys.length > 0 && (
|
||||||
|
<span>({rowSelection.selectedRowKeys?.length})</span>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,11 @@ import {
|
|||||||
} from '@/pages/resources/config/types';
|
} from '@/pages/resources/config/types';
|
||||||
import { handleBatchRequest } from '@/utils';
|
import { handleBatchRequest } from '@/utils';
|
||||||
import {
|
import {
|
||||||
|
AudioOutlined,
|
||||||
DeleteOutlined,
|
DeleteOutlined,
|
||||||
DownOutlined,
|
DownOutlined,
|
||||||
EditOutlined,
|
EditOutlined,
|
||||||
|
PictureOutlined,
|
||||||
SyncOutlined,
|
SyncOutlined,
|
||||||
WechatWorkOutlined
|
WechatWorkOutlined
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
@@ -341,6 +343,7 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
const handleLogModalCancel = useCallback(() => {
|
const handleLogModalCancel = useCallback(() => {
|
||||||
setOpenLogModal(false);
|
setOpenLogModal(false);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleDelete = async (row: any) => {
|
const handleDelete = async (row: any) => {
|
||||||
modalRef.current.show({
|
modalRef.current.show({
|
||||||
content: 'models.table.models',
|
content: 'models.table.models',
|
||||||
@@ -353,6 +356,7 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDeleteBatch = () => {
|
const handleDeleteBatch = () => {
|
||||||
modalRef.current.show({
|
modalRef.current.show({
|
||||||
content: 'models.table.models',
|
content: 'models.table.models',
|
||||||
@@ -465,12 +469,15 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
if (record.reranker) {
|
if (record.reranker) {
|
||||||
return (
|
return (
|
||||||
<Tag
|
<Tag
|
||||||
|
icon={<IconFont type="icon-rank1"></IconFont>}
|
||||||
style={{
|
style={{
|
||||||
margin: 0,
|
margin: 0,
|
||||||
opacity: 0.8,
|
opacity: 1,
|
||||||
|
paddingInline: 8,
|
||||||
|
borderRadius: 12,
|
||||||
transform: 'scale(0.9)'
|
transform: 'scale(0.9)'
|
||||||
}}
|
}}
|
||||||
color="geekblue"
|
color="cyan"
|
||||||
>
|
>
|
||||||
Reranker
|
Reranker
|
||||||
</Tag>
|
</Tag>
|
||||||
@@ -480,12 +487,15 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
if (record.embedding_only && !record.reranker) {
|
if (record.embedding_only && !record.reranker) {
|
||||||
return (
|
return (
|
||||||
<Tag
|
<Tag
|
||||||
|
icon={<IconFont type="icon-cube"></IconFont>}
|
||||||
style={{
|
style={{
|
||||||
margin: 0,
|
margin: 0,
|
||||||
opacity: 0.8,
|
opacity: 1,
|
||||||
|
paddingInline: 8,
|
||||||
|
borderRadius: 12,
|
||||||
transform: 'scale(0.9)'
|
transform: 'scale(0.9)'
|
||||||
}}
|
}}
|
||||||
color="geekblue"
|
color="purple"
|
||||||
>
|
>
|
||||||
Embedding
|
Embedding
|
||||||
</Tag>
|
</Tag>
|
||||||
@@ -494,9 +504,12 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
if (record.text_to_speech) {
|
if (record.text_to_speech) {
|
||||||
return (
|
return (
|
||||||
<Tag
|
<Tag
|
||||||
|
icon={<IconFont type="icon-sound-wave"></IconFont>}
|
||||||
style={{
|
style={{
|
||||||
margin: 0,
|
margin: 0,
|
||||||
opacity: 0.8,
|
opacity: 1,
|
||||||
|
paddingInline: 8,
|
||||||
|
borderRadius: 12,
|
||||||
transform: 'scale(0.9)'
|
transform: 'scale(0.9)'
|
||||||
}}
|
}}
|
||||||
color="geekblue"
|
color="geekblue"
|
||||||
@@ -508,12 +521,15 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
if (record.speech_to_text) {
|
if (record.speech_to_text) {
|
||||||
return (
|
return (
|
||||||
<Tag
|
<Tag
|
||||||
|
icon={<AudioOutlined />}
|
||||||
style={{
|
style={{
|
||||||
margin: 0,
|
margin: 0,
|
||||||
opacity: 0.8,
|
opacity: 1,
|
||||||
|
paddingInline: 8,
|
||||||
|
borderRadius: 12,
|
||||||
transform: 'scale(0.9)'
|
transform: 'scale(0.9)'
|
||||||
}}
|
}}
|
||||||
color="geekblue"
|
color="processing"
|
||||||
>
|
>
|
||||||
Speech-To-Text
|
Speech-To-Text
|
||||||
</Tag>
|
</Tag>
|
||||||
@@ -522,12 +538,15 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
if (record.image_only) {
|
if (record.image_only) {
|
||||||
return (
|
return (
|
||||||
<Tag
|
<Tag
|
||||||
|
icon={<PictureOutlined />}
|
||||||
style={{
|
style={{
|
||||||
margin: 0,
|
margin: 0,
|
||||||
opacity: 0.8,
|
opacity: 1,
|
||||||
|
paddingInline: 8,
|
||||||
|
borderRadius: 12,
|
||||||
transform: 'scale(0.9)'
|
transform: 'scale(0.9)'
|
||||||
}}
|
}}
|
||||||
color="geekblue"
|
color="orange"
|
||||||
>
|
>
|
||||||
Image
|
Image
|
||||||
</Tag>
|
</Tag>
|
||||||
@@ -614,7 +633,12 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
onClick={handleDeleteBatch}
|
onClick={handleDeleteBatch}
|
||||||
disabled={!rowSelection.selectedRowKeys.length}
|
disabled={!rowSelection.selectedRowKeys.length}
|
||||||
>
|
>
|
||||||
{intl?.formatMessage?.({ id: 'common.button.delete' })}
|
<span>
|
||||||
|
{intl?.formatMessage?.({ id: 'common.button.delete' })}
|
||||||
|
{rowSelection.selectedRowKeys.length > 0 && (
|
||||||
|
<span>({rowSelection.selectedRowKeys?.length})</span>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
</Access>
|
</Access>
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@@ -282,7 +282,12 @@ const Resources: React.FC = () => {
|
|||||||
onClick={handleDeleteBatch}
|
onClick={handleDeleteBatch}
|
||||||
disabled={!rowSelection.selectedRowKeys.length}
|
disabled={!rowSelection.selectedRowKeys.length}
|
||||||
>
|
>
|
||||||
{intl.formatMessage({ id: 'common.button.delete' })}
|
<span>
|
||||||
|
{intl?.formatMessage?.({ id: 'common.button.delete' })}
|
||||||
|
{rowSelection.selectedRowKeys.length > 0 && (
|
||||||
|
<span>({rowSelection.selectedRowKeys?.length})</span>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
@@ -333,7 +338,15 @@ const Resources: React.FC = () => {
|
|||||||
>
|
>
|
||||||
{_.map(record.labels, (item: any, index: string) => {
|
{_.map(record.labels, (item: any, index: string) => {
|
||||||
return (
|
return (
|
||||||
<AutoTooltip key={index} className="m-r-0" maxWidth={120}>
|
<AutoTooltip
|
||||||
|
key={index}
|
||||||
|
className="m-r-0"
|
||||||
|
maxWidth={120}
|
||||||
|
style={{
|
||||||
|
paddingInline: 8,
|
||||||
|
borderRadius: 12
|
||||||
|
}}
|
||||||
|
>
|
||||||
{index}:{item}
|
{index}:{item}
|
||||||
</AutoTooltip>
|
</AutoTooltip>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -252,7 +252,12 @@ const Users: React.FC = () => {
|
|||||||
onClick={handleDeleteBatch}
|
onClick={handleDeleteBatch}
|
||||||
disabled={!rowSelection.selectedRowKeys.length}
|
disabled={!rowSelection.selectedRowKeys.length}
|
||||||
>
|
>
|
||||||
{intl.formatMessage({ id: 'common.button.delete' })}
|
<span>
|
||||||
|
{intl?.formatMessage?.({ id: 'common.button.delete' })}
|
||||||
|
{rowSelection.selectedRowKeys.length > 0 && (
|
||||||
|
<span>({rowSelection.selectedRowKeys?.length})</span>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user