diff --git a/web/src/components/table/RedemptionsTable.js b/web/src/components/table/RedemptionsTable.js
index a7e6224f..9bdb603f 100644
--- a/web/src/components/table/RedemptionsTable.js
+++ b/web/src/components/table/RedemptionsTable.js
@@ -8,14 +8,7 @@ import {
renderQuota
} from '../../helpers';
-import {
- CheckCircle,
- XCircle,
- Minus,
- HelpCircle,
- Coins,
- Ticket
-} from 'lucide-react';
+import { Ticket } from 'lucide-react';
import { ITEMS_PER_PAGE } from '../../constants';
import {
@@ -37,16 +30,8 @@ import {
IllustrationNoResultDark
} from '@douyinfe/semi-illustrations';
import {
- IconPlus,
- IconCopy,
IconSearch,
- IconEyeOpened,
- IconEdit,
- IconDelete,
- IconStop,
- IconPlay,
IconMore,
- IconDescend
} from '@douyinfe/semi-icons';
import EditRedemption from '../../pages/Redemption/EditRedemption';
import { useTranslation } from 'react-i18next';
@@ -68,31 +53,31 @@ const RedemptionsTable = () => {
const renderStatus = (status, record) => {
if (isExpired(record)) {
return (
-
}>{t('已过期')}
+
{t('已过期')}
);
}
switch (status) {
case 1:
return (
-
}>
+
{t('未使用')}
);
case 2:
return (
-
}>
+
{t('已禁用')}
);
case 3:
return (
-
}>
+
{t('已使用')}
);
default:
return (
-
}>
+
{t('未知状态')}
);
@@ -122,7 +107,7 @@ const RedemptionsTable = () => {
render: (text, record, index) => {
return (
- }>
+
{renderQuota(parseInt(text))}
@@ -160,7 +145,6 @@ const RedemptionsTable = () => {
{
node: 'item',
name: t('删除'),
- icon:
,
type: 'danger',
onClick: () => {
Modal.confirm({
@@ -180,7 +164,6 @@ const RedemptionsTable = () => {
moreMenuItems.push({
node: 'item',
name: t('禁用'),
- icon:
,
type: 'warning',
onClick: () => {
manageRedemption(record.id, 'disable', record);
@@ -190,7 +173,6 @@ const RedemptionsTable = () => {
moreMenuItems.push({
node: 'item',
name: t('启用'),
- icon:
,
type: 'secondary',
onClick: () => {
manageRedemption(record.id, 'enable', record);
@@ -203,21 +185,17 @@ const RedemptionsTable = () => {
}
theme='light'
type='tertiary'
size="small"
- className="!rounded-full"
>
{t('查看')}
}
theme='light'
type='secondary'
size="small"
- className="!rounded-full"
onClick={async () => {
await copyText(record.key);
}}
@@ -225,11 +203,9 @@ const RedemptionsTable = () => {
{t('复制')}
}
theme='light'
type='tertiary'
size="small"
- className="!rounded-full"
onClick={() => {
setEditingRedemption(record);
setShowEdit(true);
@@ -244,11 +220,10 @@ const RedemptionsTable = () => {
menu={moreMenuItems}
>
}
theme='light'
type='tertiary'
size="small"
- className="!rounded-full"
+ icon={}
/>
@@ -451,8 +426,7 @@ const RedemptionsTable = () => {
}
- className="!rounded-full w-full md:w-auto"
+ className="w-full md:w-auto"
onClick={() => setCompactMode(!compactMode)}
>
{compactMode ? t('自适应列表') : t('紧凑列表')}
@@ -468,8 +442,7 @@ const RedemptionsTable = () => {
}
- className="!rounded-full w-full sm:w-auto"
+ className="w-full sm:w-auto"
onClick={() => {
setEditingRedemption({
id: undefined,
@@ -481,8 +454,7 @@ const RedemptionsTable = () => {
}
- className="!rounded-full w-full sm:w-auto"
+ className="w-full sm:w-auto"
onClick={async () => {
if (selectedKeys.length === 0) {
showError(t('请至少选择一个兑换码!'));
@@ -501,8 +473,7 @@ const RedemptionsTable = () => {
}
- className="!rounded-full w-full sm:w-auto"
+ className="w-full sm:w-auto"
onClick={() => {
Modal.confirm({
title: t('确定清除所有失效兑换码?'),
@@ -546,7 +517,6 @@ const RedemptionsTable = () => {
field="searchKeyword"
prefix={
}
placeholder={t('关键字(id或者名称)')}
- className="!rounded-full"
showClear
pure
/>
@@ -556,7 +526,7 @@ const RedemptionsTable = () => {
type="primary"
htmlType="submit"
loading={loading || searching}
- className="!rounded-full flex-1 md:flex-initial md:w-auto"
+ className="flex-1 md:flex-initial md:w-auto"
>
{t('查询')}
@@ -572,7 +542,7 @@ const RedemptionsTable = () => {
}, 100);
}
}}
- className="!rounded-full flex-1 md:flex-initial md:w-auto"
+ className="flex-1 md:flex-initial md:w-auto"
>
{t('重置')}
diff --git a/web/src/components/table/TaskLogsTable.js b/web/src/components/table/TaskLogsTable.js
index 65a8e2a6..0a6ccd6d 100644
--- a/web/src/components/table/TaskLogsTable.js
+++ b/web/src/components/table/TaskLogsTable.js
@@ -47,8 +47,6 @@ import { ITEMS_PER_PAGE } from '../../constants';
import {
IconEyeOpened,
IconSearch,
- IconSetting,
- IconDescend
} from '@douyinfe/semi-icons';
import { useTableCompactMode } from '../../hooks/useTableCompactMode';
@@ -600,21 +598,18 @@ const LogsTable = () => {
@@ -684,8 +679,7 @@ const LogsTable = () => {
}
- className="!rounded-full w-full md:w-auto"
+ className="w-full md:w-auto"
onClick={() => setCompactMode(!compactMode)}
>
{compactMode ? t('自适应列表') : t('紧凑列表')}
@@ -724,7 +718,6 @@ const LogsTable = () => {
field='task_id'
prefix={
}
placeholder={t('任务 ID')}
- className="!rounded-full"
showClear
pure
/>
@@ -735,7 +728,6 @@ const LogsTable = () => {
field='channel_id'
prefix={
}
placeholder={t('渠道 ID')}
- className="!rounded-full"
showClear
pure
/>
@@ -750,7 +742,6 @@ const LogsTable = () => {
type='primary'
htmlType='submit'
loading={loading}
- className="!rounded-full"
>
{t('查询')}
@@ -765,16 +756,13 @@ const LogsTable = () => {
}, 100);
}
}}
- className="!rounded-full"
>
{t('重置')}
}
onClick={() => setShowColumnSelector(true)}
- className="!rounded-full"
>
{t('列设置')}
diff --git a/web/src/components/table/TokensTable.js b/web/src/components/table/TokensTable.js
index db34dc02..f91f7b82 100644
--- a/web/src/components/table/TokensTable.js
+++ b/web/src/components/table/TokensTable.js
@@ -1,4 +1,4 @@
-import React, { useEffect, useState, useMemo } from 'react';
+import React, { useEffect, useState } from 'react';
import {
API,
copy,
@@ -9,7 +9,6 @@ import {
renderQuota,
getQuotaPerUnit
} from '../../helpers';
-
import { ITEMS_PER_PAGE } from '../../constants';
import {
Button,
@@ -29,32 +28,12 @@ import {
IllustrationNoResult,
IllustrationNoResultDark
} from '@douyinfe/semi-illustrations';
-
import {
- CheckCircle,
- Shield,
- XCircle,
- Clock,
- Gauge,
- HelpCircle,
- Infinity,
- Coins,
- Key
-} from 'lucide-react';
-
-import {
- IconPlus,
- IconCopy,
IconSearch,
IconTreeTriangleDown,
- IconEyeOpened,
- IconEdit,
- IconDelete,
- IconStop,
- IconPlay,
IconMore,
- IconDescend
} from '@douyinfe/semi-icons';
+import { Key } from 'lucide-react';
import EditToken from '../../pages/Token/EditToken';
import { useTranslation } from 'react-i18next';
import { useTableCompactMode } from '../../hooks/useTableCompactMode';
@@ -73,38 +52,38 @@ const TokensTable = () => {
case 1:
if (model_limits_enabled) {
return (
-
}>
+
{t('已启用:限制模型')}
);
} else {
return (
-
}>
+
{t('已启用')}
);
}
case 2:
return (
-
}>
+
{t('已禁用')}
);
case 3:
return (
-
}>
+
{t('已过期')}
);
case 4:
return (
-
}>
+
{t('已耗尽')}
);
default:
return (
-
}>
+
{t('未知状态')}
);
@@ -137,7 +116,7 @@ const TokensTable = () => {
render: (text, record, index) => {
return (
- }>
+
{renderQuota(parseInt(text))}
@@ -164,7 +143,7 @@ const TokensTable = () => {
return (
{record.unlimited_quota ? (
-
}>
+
{t('无限制')}
) : (
@@ -172,7 +151,6 @@ const TokensTable = () => {
size={'large'}
color={getQuotaColor(parseInt(text))}
shape='circle'
- prefixIcon={
}
>
{renderQuota(parseInt(text))}
@@ -238,7 +216,6 @@ const TokensTable = () => {
{
node: 'item',
name: t('查看'),
- icon:
,
onClick: () => {
Modal.info({
title: t('令牌详情'),
@@ -250,7 +227,6 @@ const TokensTable = () => {
{
node: 'item',
name: t('删除'),
- icon:
,
type: 'danger',
onClick: () => {
Modal.confirm({
@@ -271,7 +247,6 @@ const TokensTable = () => {
moreMenuItems.push({
node: 'item',
name: t('禁用'),
- icon:
,
type: 'warning',
onClick: () => {
manageToken(record.id, 'disable', record);
@@ -281,7 +256,6 @@ const TokensTable = () => {
moreMenuItems.push({
node: 'item',
name: t('启用'),
- icon:
,
type: 'secondary',
onClick: () => {
manageToken(record.id, 'enable', record);
@@ -292,7 +266,7 @@ const TokensTable = () => {
return (
}
theme='light'
type='secondary'
size="small"
- className="!rounded-full"
onClick={async (text) => {
await copyText('sk-' + record.key);
}}
@@ -344,11 +316,9 @@ const TokensTable = () => {
}
theme='light'
type='tertiary'
size="small"
- className="!rounded-full"
onClick={() => {
setEditingToken(record);
setShowEdit(true);
@@ -367,7 +337,6 @@ const TokensTable = () => {
theme='light'
type='tertiary'
size="small"
- className="!rounded-full"
/>
@@ -621,8 +590,7 @@ const TokensTable = () => {
}
- className="!rounded-full w-full md:w-auto"
+ className="w-full md:w-auto"
onClick={() => setCompactMode(!compactMode)}
>
{compactMode ? t('自适应列表') : t('紧凑列表')}
@@ -637,8 +605,7 @@ const TokensTable = () => {
}
- className="!rounded-full flex-1 md:flex-initial"
+ className="flex-1 md:flex-initial"
onClick={() => {
setEditingToken({
id: undefined,
@@ -651,8 +618,7 @@ const TokensTable = () => {
}
- className="!rounded-full flex-1 md:flex-initial"
+ className="flex-1 md:flex-initial"
onClick={() => {
if (selectedKeys.length === 0) {
showError(t('请至少选择一个令牌!'));
@@ -667,7 +633,6 @@ const TokensTable = () => {
}
onClick={async () => {
let content = '';
for (let i = 0; i < selectedKeys.length; i++) {
@@ -682,7 +647,6 @@ const TokensTable = () => {
}
onClick={async () => {
let content = '';
for (let i = 0; i < selectedKeys.length; i++) {
@@ -704,8 +668,7 @@ const TokensTable = () => {
}
- className="!rounded-full w-full md:w-auto"
+ className="w-full md:w-auto"
onClick={() => {
if (selectedKeys.length === 0) {
showError(t('请至少选择一个令牌!'));
@@ -743,7 +706,6 @@ const TokensTable = () => {
field="searchKeyword"
prefix={
}
placeholder={t('搜索关键字')}
- className="!rounded-full"
showClear
pure
/>
@@ -753,7 +715,6 @@ const TokensTable = () => {
field="searchToken"
prefix={
}
placeholder={t('密钥')}
- className="!rounded-full"
showClear
pure
/>
@@ -763,7 +724,7 @@ const TokensTable = () => {
type="primary"
htmlType="submit"
loading={loading || searching}
- className="!rounded-full flex-1 md:flex-initial md:w-auto"
+ className="flex-1 md:flex-initial md:w-auto"
>
{t('查询')}
@@ -778,7 +739,7 @@ const TokensTable = () => {
}, 100);
}
}}
- className="!rounded-full flex-1 md:flex-initial md:w-auto"
+ className="flex-1 md:flex-initial md:w-auto"
>
{t('重置')}
diff --git a/web/src/components/table/UsersTable.js b/web/src/components/table/UsersTable.js
index 94b82912..31a8b2c0 100644
--- a/web/src/components/table/UsersTable.js
+++ b/web/src/components/table/UsersTable.js
@@ -34,17 +34,9 @@ import {
IllustrationNoResultDark
} from '@douyinfe/semi-illustrations';
import {
- IconPlus,
IconSearch,
- IconEdit,
- IconDelete,
- IconStop,
- IconPlay,
- IconMore,
IconUserAdd,
- IconArrowUp,
- IconArrowDown,
- IconDescend
+ IconMore,
} from '@douyinfe/semi-icons';
import { ITEMS_PER_PAGE } from '../../constants';
import AddUser from '../../pages/User/AddUser';
@@ -127,7 +119,7 @@ const UsersTable = () => {
@@ -221,7 +213,6 @@ const UsersTable = () => {
{
node: 'item',
name: t('提升'),
- icon: ,
type: 'warning',
onClick: () => {
Modal.confirm({
@@ -236,7 +227,6 @@ const UsersTable = () => {
{
node: 'item',
name: t('降级'),
- icon: ,
type: 'secondary',
onClick: () => {
Modal.confirm({
@@ -251,7 +241,6 @@ const UsersTable = () => {
{
node: 'item',
name: t('注销'),
- icon: ,
type: 'danger',
onClick: () => {
Modal.confirm({
@@ -272,7 +261,6 @@ const UsersTable = () => {
moreMenuItems.splice(-1, 0, {
node: 'item',
name: t('禁用'),
- icon: ,
type: 'warning',
onClick: () => {
manageUser(record.id, 'disable', record);
@@ -282,7 +270,6 @@ const UsersTable = () => {
moreMenuItems.splice(-1, 0, {
node: 'item',
name: t('启用'),
- icon: ,
type: 'secondary',
onClick: () => {
manageUser(record.id, 'enable', record);
@@ -294,11 +281,9 @@ const UsersTable = () => {
return (
}
theme='light'
type='tertiary'
size="small"
- className="!rounded-full"
onClick={() => {
setEditingUser(record);
setShowEditUser(true);
@@ -312,11 +297,10 @@ const UsersTable = () => {
menu={moreMenuItems}
>
}
theme='light'
type='tertiary'
size="small"
- className="!rounded-full"
+ icon={}
/>
@@ -538,8 +522,7 @@ const UsersTable = () => {
}
- className="!rounded-full w-full md:w-auto"
+ className="w-full md:w-auto"
onClick={() => setCompactMode(!compactMode)}
>
{compactMode ? t('自适应列表') : t('紧凑列表')}
@@ -554,8 +537,7 @@ const UsersTable = () => {
}
- className="!rounded-full w-full md:w-auto"
+ className="w-full md:w-auto"
onClick={() => {
setShowAddUser(true);
}}
@@ -584,7 +566,6 @@ const UsersTable = () => {
field="searchKeyword"
prefix={}
placeholder={t('支持搜索用户的 ID、用户名、显示名称和邮箱地址')}
- className="!rounded-full"
showClear
pure
/>
@@ -601,7 +582,7 @@ const UsersTable = () => {
searchUsers(1, pageSize);
}, 100);
}}
- className="!rounded-full w-full"
+ className="w-full"
showClear
pure
/>
@@ -611,7 +592,7 @@ const UsersTable = () => {
type="primary"
htmlType="submit"
loading={loading || searching}
- className="!rounded-full flex-1 md:flex-initial md:w-auto"
+ className="flex-1 md:flex-initial md:w-auto"
>
{t('查询')}
@@ -627,7 +608,7 @@ const UsersTable = () => {
}, 100);
}
}}
- className="!rounded-full flex-1 md:flex-initial md:w-auto"
+ className="flex-1 md:flex-initial md:w-auto"
>
{t('重置')}
@@ -689,7 +670,7 @@ const UsersTable = () => {
style={{ padding: 30 }}
/>
}
- className="rounded-xl overflow-hidden"
+ className="overflow-hidden"
size="middle"
/>
diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json
index 8a38ef0c..9a0369e6 100644
--- a/web/src/i18n/locales/en.json
+++ b/web/src/i18n/locales/en.json
@@ -456,7 +456,7 @@
"创建新的令牌": "Create New Token",
"令牌分组,默认为用户的分组": "Token group, default is the your's group",
"IP白名单": "IP whitelist",
- "注意,令牌的额度仅用于限制令牌本身的最大额度使用量,实际的使用受到账户的剩余额度限制。": "Note that the quota of the token is only used to limit the maximum quota usage of the token itself, and the actual usage is limited by the remaining quota of the account.",
+ "令牌的额度仅用于限制令牌本身的最大额度使用量,实际的使用受到账户的剩余额度限制": "The quota of the token is only used to limit the maximum quota usage of the token itself, and the actual usage is limited by the remaining quota of the account",
"无限额度": "Unlimited quota",
"更新令牌信息": "Update Token Information",
"请输入充值码!": "Please enter the recharge code!",
@@ -1746,7 +1746,7 @@
"请先选择模型!": "Please select a model first!",
"已复制 ${count} 个模型": "Copied ${count} models",
"复制失败,请手动复制": "Copy failed, please copy manually",
- "快捷设置": "Quick settings",
+ "过期时间快捷设置": "Expiration time quick settings",
"批量创建时会在名称后自动添加随机后缀": "When creating in batches, a random suffix will be automatically added to the name",
"额度必须大于0": "Quota must be greater than 0",
"生成数量必须大于0": "Generation quantity must be greater than 0",
diff --git a/web/src/index.css b/web/src/index.css
index b9a772ac..8e71536a 100644
--- a/web/src/index.css
+++ b/web/src/index.css
@@ -43,6 +43,7 @@ code {
/* ==================== 导航和侧边栏样式 ==================== */
/* 导航项样式 */
+.semi-input-textarea-wrapper,
.semi-navigation-sub-title,
.semi-chat-inputBox-sendButton,
.semi-page-item,
@@ -53,7 +54,7 @@ code {
.semi-select,
.semi-button,
.semi-datepicker-range-input {
- border-radius: 9999px !important;
+ border-radius: 10px !important;
}
.semi-navigation-item {
diff --git a/web/src/pages/Channel/EditChannel.js b/web/src/pages/Channel/EditChannel.js
index 1ca3d374..a05b5703 100644
--- a/web/src/pages/Channel/EditChannel.js
+++ b/web/src/pages/Channel/EditChannel.js
@@ -457,7 +457,6 @@ const EditChannel = (props) => {
}
>
@@ -465,7 +464,6 @@ const EditChannel = (props) => {
}
@@ -479,7 +477,7 @@ const EditChannel = (props) => {
onCancel={() => handleCancel()}
>
-
+
{/* Header: Basic Info */}
@@ -505,7 +503,6 @@ const EditChannel = (props) => {
filter
searchPosition='dropdown'
placeholder={t('请选择渠道类型')}
- className="!rounded-lg"
/>
@@ -520,7 +517,6 @@ const EditChannel = (props) => {
}}
value={inputs.name}
autoComplete='new-password'
- className="!rounded-lg"
/>
@@ -537,7 +533,6 @@ const EditChannel = (props) => {
value={inputs.key}
autosize={{ minRows: 6, maxRows: 6 }}
autoComplete='new-password'
- className="!rounded-lg"
/>
) : (
<>
@@ -566,7 +561,6 @@ const EditChannel = (props) => {
autosize={{ minRows: 10 }}
value={inputs.key}
autoComplete='new-password'
- className="!rounded-lg font-mono"
/>
) : (
{
}}
value={inputs.key}
autoComplete='new-password'
- className="!rounded-lg"
/>
)}
>
@@ -627,7 +620,6 @@ const EditChannel = (props) => {
}
- className='!rounded-lg'
/>
)}
@@ -646,7 +638,6 @@ const EditChannel = (props) => {
onChange={(value) => handleInputChange('base_url', value)}
value={inputs.base_url}
autoComplete='new-password'
- className="!rounded-lg"
/>
@@ -657,7 +648,6 @@ const EditChannel = (props) => {
onChange={(value) => handleInputChange('other', value)}
value={inputs.other}
autoComplete='new-password'
- className="!rounded-lg"
/>
>
@@ -678,7 +668,6 @@ const EditChannel = (props) => {
onChange={(value) => handleInputChange('base_url', value)}
value={inputs.base_url}
autoComplete='new-password'
- className="!rounded-lg"
/>
>
@@ -701,7 +690,6 @@ const EditChannel = (props) => {
onChange={(value) => handleInputChange('base_url', value)}
value={inputs.base_url}
autoComplete='new-password'
- className="!rounded-lg"
/>