diff --git a/src/components/icon-font/iconfont/iconfont.css b/src/components/icon-font/iconfont/iconfont.css index a7a25f11..695fe840 100644 --- a/src/components/icon-font/iconfont/iconfont.css +++ b/src/components/icon-font/iconfont/iconfont.css @@ -1,9 +1,9 @@ @font-face { font-family: iconfont; /* Project id 4613488 */ src: - url('iconfont.woff2?t=1732806927800') format('woff2'), - url('iconfont.woff?t=1732806927800') format('woff'), - url('iconfont.ttf?t=1732806927800') format('truetype'); + url('iconfont.woff2?t=1734062014514') format('woff2'), + url('iconfont.woff?t=1734062014514') format('woff'), + url('iconfont.ttf?t=1734062014514') format('truetype'); } .iconfont { @@ -14,6 +14,22 @@ -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 { content: '\e603'; } diff --git a/src/components/icon-font/iconfont/iconfont.js b/src/components/icon-font/iconfont/iconfont.js index 8ef116da..50a1806f 100644 --- a/src/components/icon-font/iconfont/iconfont.js +++ b/src/components/icon-font/iconfont/iconfont.js @@ -1,5 +1,5 @@ (window._iconfont_svg_string_4613488 = - ''), + ''), ((h) => { var a = (l = (l = document.getElementsByTagName('script'))[ l.length - 1 @@ -9,9 +9,9 @@ var c, z, t, + v, i, - m, - v = function (a, l) { + m = function (a, l) { l.parentNode.insertBefore(a, l); }; if (a && !h.__iconfont__svg__cssinject__) { @@ -36,7 +36,7 @@ (l.style.overflow = 'hidden'), (l = l), (a = document.body).firstChild - ? v(l, a.firstChild) + ? m(l, a.firstChild) : a.appendChild(l)); }), document.addEventListener @@ -48,20 +48,20 @@ document.addEventListener('DOMContentLoaded', z, !1)) : document.attachEvent && ((t = c), - (i = h.document), - (m = !1), + (v = h.document), + (i = !1), p(), - (i.onreadystatechange = function () { - 'complete' == i.readyState && - ((i.onreadystatechange = null), o()); + (v.onreadystatechange = function () { + 'complete' == v.readyState && + ((v.onreadystatechange = null), o()); })); } function o() { - m || ((m = !0), t()); + i || ((i = !0), t()); } function p() { try { - i.documentElement.doScroll('left'); + v.documentElement.doScroll('left'); } catch (a) { return void setTimeout(p, 50); } diff --git a/src/components/icon-font/iconfont/iconfont.json b/src/components/icon-font/iconfont/iconfont.json index 347f51f8..161cfc01 100644 --- a/src/components/icon-font/iconfont/iconfont.json +++ b/src/components/icon-font/iconfont/iconfont.json @@ -5,6 +5,34 @@ "css_prefix_text": "icon-", "description": "", "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", "name": "随机", diff --git a/src/components/icon-font/iconfont/iconfont.ttf b/src/components/icon-font/iconfont/iconfont.ttf index 5d5095b5..a01ab979 100644 Binary files a/src/components/icon-font/iconfont/iconfont.ttf and b/src/components/icon-font/iconfont/iconfont.ttf differ diff --git a/src/components/icon-font/iconfont/iconfont.woff b/src/components/icon-font/iconfont/iconfont.woff index 486e5a41..bd7007f4 100644 Binary files a/src/components/icon-font/iconfont/iconfont.woff and b/src/components/icon-font/iconfont/iconfont.woff differ diff --git a/src/components/icon-font/iconfont/iconfont.woff2 b/src/components/icon-font/iconfont/iconfont.woff2 index 7312b975..12a04fbf 100644 Binary files a/src/components/icon-font/iconfont/iconfont.woff2 and b/src/components/icon-font/iconfont/iconfont.woff2 differ diff --git a/src/components/icon-font/index.tsx b/src/components/icon-font/index.tsx index 551ae4e1..2c4fbc7b 100644 --- a/src/components/icon-font/index.tsx +++ b/src/components/icon-font/index.tsx @@ -1,8 +1,8 @@ import { createFromIconfontCN } from '@ant-design/icons'; -// import './iconfont/iconfont.js'; +import './iconfont/iconfont.js'; const IconFont = createFromIconfontCN({ - scriptUrl: '//at.alicdn.com/t/c/font_4613488_oyisgn7lqa.js' + scriptUrl: '' }); export default IconFont; diff --git a/src/pages/api-keys/index.tsx b/src/pages/api-keys/index.tsx index 4c9b98dc..96b5de10 100644 --- a/src/pages/api-keys/index.tsx +++ b/src/pages/api-keys/index.tsx @@ -195,7 +195,12 @@ const APIKeys: React.FC = () => { onClick={handleDeleteBatch} disabled={!rowSelection.selectedRowKeys.length} > - {intl.formatMessage({ id: 'common.button.delete' })} + + {intl?.formatMessage?.({ id: 'common.button.delete' })} + {rowSelection.selectedRowKeys.length > 0 && ( + ({rowSelection.selectedRowKeys?.length}) + )} + } diff --git a/src/pages/llmodels/components/table-list.tsx b/src/pages/llmodels/components/table-list.tsx index 2a09b5b8..801443f3 100644 --- a/src/pages/llmodels/components/table-list.tsx +++ b/src/pages/llmodels/components/table-list.tsx @@ -17,9 +17,11 @@ import { } from '@/pages/resources/config/types'; import { handleBatchRequest } from '@/utils'; import { + AudioOutlined, DeleteOutlined, DownOutlined, EditOutlined, + PictureOutlined, SyncOutlined, WechatWorkOutlined } from '@ant-design/icons'; @@ -341,6 +343,7 @@ const Models: React.FC = ({ const handleLogModalCancel = useCallback(() => { setOpenLogModal(false); }, []); + const handleDelete = async (row: any) => { modalRef.current.show({ content: 'models.table.models', @@ -353,6 +356,7 @@ const Models: React.FC = ({ } }); }; + const handleDeleteBatch = () => { modalRef.current.show({ content: 'models.table.models', @@ -465,12 +469,15 @@ const Models: React.FC = ({ if (record.reranker) { return ( } style={{ margin: 0, - opacity: 0.8, + opacity: 1, + paddingInline: 8, + borderRadius: 12, transform: 'scale(0.9)' }} - color="geekblue" + color="cyan" > Reranker @@ -480,12 +487,15 @@ const Models: React.FC = ({ if (record.embedding_only && !record.reranker) { return ( } style={{ margin: 0, - opacity: 0.8, + opacity: 1, + paddingInline: 8, + borderRadius: 12, transform: 'scale(0.9)' }} - color="geekblue" + color="purple" > Embedding @@ -494,9 +504,12 @@ const Models: React.FC = ({ if (record.text_to_speech) { return ( } style={{ margin: 0, - opacity: 0.8, + opacity: 1, + paddingInline: 8, + borderRadius: 12, transform: 'scale(0.9)' }} color="geekblue" @@ -508,12 +521,15 @@ const Models: React.FC = ({ if (record.speech_to_text) { return ( } style={{ margin: 0, - opacity: 0.8, + opacity: 1, + paddingInline: 8, + borderRadius: 12, transform: 'scale(0.9)' }} - color="geekblue" + color="processing" > Speech-To-Text @@ -522,12 +538,15 @@ const Models: React.FC = ({ if (record.image_only) { return ( } style={{ margin: 0, - opacity: 0.8, + opacity: 1, + paddingInline: 8, + borderRadius: 12, transform: 'scale(0.9)' }} - color="geekblue" + color="orange" > Image @@ -614,7 +633,12 @@ const Models: React.FC = ({ onClick={handleDeleteBatch} disabled={!rowSelection.selectedRowKeys.length} > - {intl?.formatMessage?.({ id: 'common.button.delete' })} + + {intl?.formatMessage?.({ id: 'common.button.delete' })} + {rowSelection.selectedRowKeys.length > 0 && ( + ({rowSelection.selectedRowKeys?.length}) + )} + diff --git a/src/pages/resources/components/workers.tsx b/src/pages/resources/components/workers.tsx index bf59e0eb..a89048e6 100644 --- a/src/pages/resources/components/workers.tsx +++ b/src/pages/resources/components/workers.tsx @@ -282,7 +282,12 @@ const Resources: React.FC = () => { onClick={handleDeleteBatch} disabled={!rowSelection.selectedRowKeys.length} > - {intl.formatMessage({ id: 'common.button.delete' })} + + {intl?.formatMessage?.({ id: 'common.button.delete' })} + {rowSelection.selectedRowKeys.length > 0 && ( + ({rowSelection.selectedRowKeys?.length}) + )} + } @@ -333,7 +338,15 @@ const Resources: React.FC = () => { > {_.map(record.labels, (item: any, index: string) => { return ( - + {index}:{item} ); diff --git a/src/pages/users/index.tsx b/src/pages/users/index.tsx index 6e22875a..b71e8dc5 100644 --- a/src/pages/users/index.tsx +++ b/src/pages/users/index.tsx @@ -252,7 +252,12 @@ const Users: React.FC = () => { onClick={handleDeleteBatch} disabled={!rowSelection.selectedRowKeys.length} > - {intl.formatMessage({ id: 'common.button.delete' })} + + {intl?.formatMessage?.({ id: 'common.button.delete' })} + {rowSelection.selectedRowKeys.length > 0 && ( + ({rowSelection.selectedRowKeys?.length}) + )} + }