Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
33f4e404
authored
Jul 14, 2025
by
t0ng7u
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🍎
style(button): Optimize the colors of all buttons to reduce visual fatigue
parent
5c55da29
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
127 additions
and
217 deletions
+127
-217
web/src/components/table/ChannelsTable.js
+80
-119
web/src/components/table/LogsTable.js
+9
-20
web/src/components/table/MjLogsTable.js
+6
-17
web/src/components/table/RedemptionsTable.js
+5
-11
web/src/components/table/TaskLogsTable.js
+6
-17
web/src/components/table/TokensTable.js
+8
-21
web/src/components/table/UsersTable.js
+3
-8
web/src/helpers/render.js
+4
-4
web/src/index.css
+6
-0
No files found.
web/src/components/table/ChannelsTable.js
View file @
33f4e404
...
@@ -563,7 +563,7 @@ const ChannelsTable = () => {
...
@@ -563,7 +563,7 @@ const ChannelsTable = () => {
{
{
node
:
'item'
,
node
:
'item'
,
name
:
t
(
'复制'
),
name
:
t
(
'复制'
),
type
:
'
prim
ary'
,
type
:
'
terti
ary'
,
onClick
:
()
=>
{
onClick
:
()
=>
{
Modal
.
confirm
({
Modal
.
confirm
({
title
:
t
(
'确定是否要复制此渠道?'
),
title
:
t
(
'确定是否要复制此渠道?'
),
...
@@ -581,15 +581,15 @@ const ChannelsTable = () => {
...
@@ -581,15 +581,15 @@ const ChannelsTable = () => {
aria
-
label
=
{
t
(
'测试单个渠道操作项目组'
)}
aria
-
label
=
{
t
(
'测试单个渠道操作项目组'
)}
>
>
<
Button
<
Button
theme
=
'light'
size
=
"small"
size
=
"small"
type
=
'tertiary'
onClick
=
{()
=>
testChannel
(
record
,
''
)}
onClick
=
{()
=>
testChannel
(
record
,
''
)}
>
>
{
t
(
'测试'
)}
{
t
(
'测试'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
theme
=
'light'
size
=
"small"
size
=
"small"
type
=
'tertiary'
icon
=
{
<
IconTreeTriangleDown
/>
}
icon
=
{
<
IconTreeTriangleDown
/>
}
onClick
=
{()
=>
{
onClick
=
{()
=>
{
setCurrentTestChannel
(
record
);
setCurrentTestChannel
(
record
);
...
@@ -605,8 +605,7 @@ const ChannelsTable = () => {
...
@@ -605,8 +605,7 @@ const ChannelsTable = () => {
{
{
record
.
status
===
1
?
(
record
.
status
===
1
?
(
<
Button
<
Button
theme
=
'light'
type
=
'danger'
type
=
'warning'
size
=
"small"
size
=
"small"
onClick
=
{()
=>
manageChannel
(
record
.
id
,
'disable'
,
record
)}
onClick
=
{()
=>
manageChannel
(
record
.
id
,
'disable'
,
record
)}
>
>
...
@@ -614,8 +613,6 @@ const ChannelsTable = () => {
...
@@ -614,8 +613,6 @@ const ChannelsTable = () => {
<
/Button
>
<
/Button
>
)
:
(
)
:
(
<
Button
<
Button
theme
=
'light'
type
=
'secondary'
size
=
"small"
size
=
"small"
onClick
=
{()
=>
manageChannel
(
record
.
id
,
'enable'
,
record
)}
onClick
=
{()
=>
manageChannel
(
record
.
id
,
'enable'
,
record
)}
>
>
...
@@ -635,7 +632,6 @@ const ChannelsTable = () => {
...
@@ -635,7 +632,6 @@ const ChannelsTable = () => {
]}
]}
>
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
size
=
"small"
size
=
"small"
icon
=
{
<
IconTreeTriangleDown
/>
}
icon
=
{
<
IconTreeTriangleDown
/>
}
...
@@ -645,8 +641,7 @@ const ChannelsTable = () => {
...
@@ -645,8 +641,7 @@ const ChannelsTable = () => {
)
:
(
)
:
(
record
.
status
===
1
?
(
record
.
status
===
1
?
(
<
Button
<
Button
theme
=
'light'
type
=
'danger'
type
=
'warning'
size
=
"small"
size
=
"small"
onClick
=
{()
=>
manageChannel
(
record
.
id
,
'disable'
,
record
)}
onClick
=
{()
=>
manageChannel
(
record
.
id
,
'disable'
,
record
)}
>
>
...
@@ -654,8 +649,6 @@ const ChannelsTable = () => {
...
@@ -654,8 +649,6 @@ const ChannelsTable = () => {
<
/Button
>
<
/Button
>
)
:
(
)
:
(
<
Button
<
Button
theme
=
'light'
type
=
'secondary'
size
=
"small"
size
=
"small"
onClick
=
{()
=>
manageChannel
(
record
.
id
,
'enable'
,
record
)}
onClick
=
{()
=>
manageChannel
(
record
.
id
,
'enable'
,
record
)}
>
>
...
@@ -665,7 +658,6 @@ const ChannelsTable = () => {
...
@@ -665,7 +658,6 @@ const ChannelsTable = () => {
)}
)}
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
size
=
"small"
size
=
"small"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
...
@@ -683,7 +675,6 @@ const ChannelsTable = () => {
...
@@ -683,7 +675,6 @@ const ChannelsTable = () => {
>
>
<
Button
<
Button
icon
=
{
<
IconMore
/>
}
icon
=
{
<
IconMore
/>
}
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
size
=
"small"
size
=
"small"
/>
/>
...
@@ -695,23 +686,20 @@ const ChannelsTable = () => {
...
@@ -695,23 +686,20 @@ const ChannelsTable = () => {
return
(
return
(
<
Space
wrap
>
<
Space
wrap
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'secondary'
size
=
"small"
size
=
"small"
onClick
=
{()
=>
manageTag
(
record
.
key
,
'enable'
)}
onClick
=
{()
=>
manageTag
(
record
.
key
,
'enable'
)}
>
>
{
t
(
'启用全部'
)}
{
t
(
'启用全部'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'warning'
size
=
"small"
size
=
"small"
onClick
=
{()
=>
manageTag
(
record
.
key
,
'disable'
)}
onClick
=
{()
=>
manageTag
(
record
.
key
,
'disable'
)}
>
>
{
t
(
'禁用全部'
)}
{
t
(
'禁用全部'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
size
=
"small"
size
=
"small"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
...
@@ -783,22 +771,13 @@ const ChannelsTable = () => {
...
@@ -783,22 +771,13 @@ const ChannelsTable = () => {
onCancel
=
{()
=>
setShowColumnSelector
(
false
)}
onCancel
=
{()
=>
setShowColumnSelector
(
false
)}
footer
=
{
footer
=
{
<
div
className
=
"flex justify-end"
>
<
div
className
=
"flex justify-end"
>
<
Button
<
Button
onClick
=
{()
=>
initDefaultColumns
()}
>
theme
=
"light"
onClick
=
{()
=>
initDefaultColumns
()}
>
{
t
(
'重置'
)}
{
t
(
'重置'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
theme
=
"light"
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
{
t
(
'取消'
)}
{
t
(
'取消'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
type
=
'primary'
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
{
t
(
'确定'
)}
{
t
(
'确定'
)}
<
/Button
>
<
/Button
>
<
/div
>
<
/div
>
...
@@ -1605,7 +1584,6 @@ const ChannelsTable = () => {
...
@@ -1605,7 +1584,6 @@ const ChannelsTable = () => {
<
Button
<
Button
size
=
'small'
size
=
'small'
disabled
=
{
!
enableBatchDelete
}
disabled
=
{
!
enableBatchDelete
}
theme
=
'light'
type
=
'danger'
type
=
'danger'
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
...
@@ -1622,8 +1600,7 @@ const ChannelsTable = () => {
...
@@ -1622,8 +1600,7 @@ const ChannelsTable = () => {
<
Button
<
Button
size
=
'small'
size
=
'small'
disabled
=
{
!
enableBatchDelete
}
disabled
=
{
!
enableBatchDelete
}
theme
=
'light'
type
=
'tertiary'
type
=
'primary'
onClick
=
{()
=>
setShowBatchSetTag
(
true
)}
onClick
=
{()
=>
setShowBatchSetTag
(
true
)}
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
>
>
...
@@ -1638,8 +1615,7 @@ const ChannelsTable = () => {
...
@@ -1638,8 +1615,7 @@ const ChannelsTable = () => {
<
Dropdown
.
Item
>
<
Dropdown
.
Item
>
<
Button
<
Button
size
=
'small'
size
=
'small'
theme
=
'light'
type
=
'tertiary'
type
=
'warning'
className
=
"w-full"
className
=
"w-full"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
Modal
.
confirm
({
Modal
.
confirm
({
...
@@ -1657,58 +1633,54 @@ const ChannelsTable = () => {
...
@@ -1657,58 +1633,54 @@ const ChannelsTable = () => {
<
Dropdown
.
Item
>
<
Dropdown
.
Item
>
<
Button
<
Button
size
=
'small'
size
=
'small'
theme
=
'light'
type
=
'secondary'
className
=
"w-full"
className
=
"w-full"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
Modal
.
confirm
({
Modal
.
confirm
({
title
:
t
(
'确定?'
),
title
:
t
(
'确定
是否要修复数据库一致性
?'
),
content
:
t
(
'
确定要更新所有已启用通道余额吗?
'
),
content
:
t
(
'
进行该操作时,可能导致渠道访问错误,请仅在数据库出现问题时使用
'
),
onOk
:
()
=>
updateAllChannelsBalance
(),
onOk
:
()
=>
fixChannelsAbilities
(),
size
:
'sm'
,
size
:
'sm'
,
centered
:
true
,
centered
:
true
,
});
});
}}
}}
>
>
{
t
(
'
更新所有已启用通道余额
'
)}
{
t
(
'
修复数据库一致性
'
)}
<
/Button
>
<
/Button
>
<
/Dropdown.Item
>
<
/Dropdown.Item
>
<
Dropdown
.
Item
>
<
Dropdown
.
Item
>
<
Button
<
Button
size
=
'small'
size
=
'small'
theme
=
'light'
type
=
'secondary'
type
=
'danger'
className
=
"w-full"
className
=
"w-full"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
Modal
.
confirm
({
Modal
.
confirm
({
title
:
t
(
'确定
是否要删除禁用通道
?'
),
title
:
t
(
'确定?'
),
content
:
t
(
'
此修改将不可逆
'
),
content
:
t
(
'
确定要更新所有已启用通道余额吗?
'
),
onOk
:
()
=>
deleteAllDisabledChannels
(),
onOk
:
()
=>
updateAllChannelsBalance
(),
size
:
'sm'
,
size
:
'sm'
,
centered
:
true
,
centered
:
true
,
});
});
}}
}}
>
>
{
t
(
'
删除禁用通道
'
)}
{
t
(
'
更新所有已启用通道余额
'
)}
<
/Button
>
<
/Button
>
<
/Dropdown.Item
>
<
/Dropdown.Item
>
<
Dropdown
.
Item
>
<
Dropdown
.
Item
>
<
Button
<
Button
size
=
'small'
size
=
'small'
theme
=
'light'
type
=
'danger'
type
=
'tertiary'
className
=
"w-full"
className
=
"w-full"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
Modal
.
confirm
({
Modal
.
confirm
({
title
:
t
(
'确定是否要
修复数据库一致性
?'
),
title
:
t
(
'确定是否要
删除禁用通道
?'
),
content
:
t
(
'
进行该操作时,可能导致渠道访问错误,请仅在数据库出现问题时使用
'
),
content
:
t
(
'
此修改将不可逆
'
),
onOk
:
()
=>
fixChannelsAbilitie
s
(),
onOk
:
()
=>
deleteAllDisabledChannel
s
(),
size
:
'sm'
,
size
:
'sm'
,
centered
:
true
,
centered
:
true
,
});
});
}}
}}
>
>
{
t
(
'
修复数据库一致性
'
)}
{
t
(
'
删除禁用通道
'
)}
<
/Button
>
<
/Button
>
<
/Dropdown.Item
>
<
/Dropdown.Item
>
<
/Dropdown.Menu
>
<
/Dropdown.Menu
>
...
@@ -1721,8 +1693,7 @@ const ChannelsTable = () => {
...
@@ -1721,8 +1693,7 @@ const ChannelsTable = () => {
<
Button
<
Button
size
=
'small'
size
=
'small'
theme
=
'light'
type
=
'tertiary'
type
=
'secondary'
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
>
>
...
@@ -1825,8 +1796,7 @@ const ChannelsTable = () => {
...
@@ -1825,8 +1796,7 @@ const ChannelsTable = () => {
<
Button
<
Button
size
=
'small'
size
=
'small'
theme
=
'light'
type
=
'tertiary'
type
=
'primary'
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
onClick
=
{
refresh
}
onClick
=
{
refresh
}
>
>
...
@@ -1835,7 +1805,6 @@ const ChannelsTable = () => {
...
@@ -1835,7 +1805,6 @@ const ChannelsTable = () => {
<
Button
<
Button
size
=
'small'
size
=
'small'
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
onClick
=
{()
=>
setShowColumnSelector
(
true
)}
onClick
=
{()
=>
setShowColumnSelector
(
true
)}
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
...
@@ -1898,7 +1867,7 @@ const ChannelsTable = () => {
...
@@ -1898,7 +1867,7 @@ const ChannelsTable = () => {
<
/div
>
<
/div
>
<
Button
<
Button
size
=
'small'
size
=
'small'
type
=
"
prim
ary"
type
=
"
terti
ary"
htmlType
=
"submit"
htmlType
=
"submit"
loading
=
{
loading
||
searching
}
loading
=
{
loading
||
searching
}
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
...
@@ -1907,7 +1876,7 @@ const ChannelsTable = () => {
...
@@ -1907,7 +1876,7 @@ const ChannelsTable = () => {
<
/Button
>
<
/Button
>
<
Button
<
Button
size
=
'small'
size
=
'small'
t
heme
=
'light
'
t
ype
=
'tertiary
'
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
formApi
)
{
if
(
formApi
)
{
formApi
.
reset
();
formApi
.
reset
();
...
@@ -2033,9 +2002,55 @@ const ChannelsTable = () => {
...
@@ -2033,9 +2002,55 @@ const ChannelsTable = () => {
{
t
(
'共'
)}
{
currentTestChannel
.
models
.
split
(
','
).
length
}
{
t
(
'个模型'
)}
{
t
(
'共'
)}
{
currentTestChannel
.
models
.
split
(
','
).
length
}
{
t
(
'个模型'
)}
<
/Typography.Text
>
<
/Typography.Text
>
<
/div
>
<
/div
>
<
/div
>
)
}
visible
=
{
showModelTestModal
&&
currentTestChannel
!==
null
}
onCancel
=
{
handleCloseModal
}
footer
=
{
<
div
className
=
"flex justify-end"
>
{
isBatchTesting
?
(
<
Button
type
=
'danger'
onClick
=
{
handleCloseModal
}
>
{
t
(
'停止测试'
)}
<
/Button
>
)
:
(
<
Button
type
=
'tertiary'
onClick
=
{
handleCloseModal
}
>
{
t
(
'取消'
)}
<
/Button
>
)}
<
Button
onClick
=
{
batchTestModels
}
loading
=
{
isBatchTesting
}
disabled
=
{
isBatchTesting
}
>
{
isBatchTesting
?
t
(
'测试中...'
)
:
t
(
'批量测试${count}个模型'
).
replace
(
'${count}'
,
currentTestChannel
?
currentTestChannel
.
models
.
split
(
','
)
.
filter
((
model
)
=>
model
.
toLowerCase
().
includes
(
modelSearchKeyword
.
toLowerCase
())
).
length
:
0
)}
<
/Button
>
<
/div
>
}
maskClosable
=
{
!
isBatchTesting
}
className
=
"!rounded-lg"
size
=
{
isMobile
()
?
'full-width'
:
'large'
}
>
<
div
className
=
"model-test-scroll"
>
{
currentTestChannel
&&
(
<
div
>
{
/* 搜索与操作按钮 */
}
{
/* 搜索与操作按钮 */
}
<
div
className
=
"flex items-center justify-end gap-2 w-full"
>
<
div
className
=
"flex items-center justify-end gap-2 w-full
mb-2
"
>
<
Input
<
Input
placeholder
=
{
t
(
'搜索模型...'
)}
placeholder
=
{
t
(
'搜索模型...'
)}
value
=
{
modelSearchKeyword
}
value
=
{
modelSearchKeyword
}
...
@@ -2049,7 +2064,6 @@ const ChannelsTable = () => {
...
@@ -2049,7 +2064,6 @@ const ChannelsTable = () => {
/>
/>
<
Button
<
Button
theme
=
'light'
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
selectedModelKeys
.
length
===
0
)
{
if
(
selectedModelKeys
.
length
===
0
)
{
showError
(
t
(
'请先选择模型!'
));
showError
(
t
(
'请先选择模型!'
));
...
@@ -2068,8 +2082,7 @@ const ChannelsTable = () => {
...
@@ -2068,8 +2082,7 @@ const ChannelsTable = () => {
<
/Button
>
<
/Button
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'primary'
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
!
currentTestChannel
)
return
;
if
(
!
currentTestChannel
)
return
;
const
successKeys
=
currentTestChannel
.
models
const
successKeys
=
currentTestChannel
.
models
...
@@ -2088,57 +2101,6 @@ const ChannelsTable = () => {
...
@@ -2088,57 +2101,6 @@ const ChannelsTable = () => {
{
t
(
'选择成功'
)}
{
t
(
'选择成功'
)}
<
/Button
>
<
/Button
>
<
/div
>
<
/div
>
<
/div
>
)
}
visible
=
{
showModelTestModal
&&
currentTestChannel
!==
null
}
onCancel
=
{
handleCloseModal
}
footer
=
{
<
div
className
=
"flex justify-end"
>
{
isBatchTesting
?
(
<
Button
theme
=
'light'
type
=
'warning'
onClick
=
{
handleCloseModal
}
>
{
t
(
'停止测试'
)}
<
/Button
>
)
:
(
<
Button
theme
=
'light'
type
=
'tertiary'
onClick
=
{
handleCloseModal
}
>
{
t
(
'取消'
)}
<
/Button
>
)}
<
Button
theme
=
'light'
type
=
'primary'
onClick
=
{
batchTestModels
}
loading
=
{
isBatchTesting
}
disabled
=
{
isBatchTesting
}
>
{
isBatchTesting
?
t
(
'测试中...'
)
:
t
(
'批量测试${count}个模型'
).
replace
(
'${count}'
,
currentTestChannel
?
currentTestChannel
.
models
.
split
(
','
)
.
filter
((
model
)
=>
model
.
toLowerCase
().
includes
(
modelSearchKeyword
.
toLowerCase
())
).
length
:
0
)}
<
/Button
>
<
/div
>
}
maskClosable
=
{
!
isBatchTesting
}
className
=
"!rounded-lg"
size
=
{
isMobile
()
?
'full-width'
:
'large'
}
>
<
div
className
=
"model-test-scroll"
>
{
currentTestChannel
&&
(
<
div
>
<
Table
<
Table
columns
=
{[
columns
=
{[
{
{
...
@@ -2197,8 +2159,7 @@ const ChannelsTable = () => {
...
@@ -2197,8 +2159,7 @@ const ChannelsTable = () => {
const
isTesting
=
testingModels
.
has
(
record
.
model
);
const
isTesting
=
testingModels
.
has
(
record
.
model
);
return
(
return
(
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'primary'
onClick
=
{()
=>
testChannel
(
currentTestChannel
,
record
.
model
)}
onClick
=
{()
=>
testChannel
(
currentTestChannel
,
record
.
model
)}
loading
=
{
isTesting
}
loading
=
{
isTesting
}
size
=
'small'
size
=
'small'
...
...
web/src/components/table/LogsTable.js
View file @
33f4e404
...
@@ -697,22 +697,13 @@ const LogsTable = () => {
...
@@ -697,22 +697,13 @@ const LogsTable = () => {
onCancel
=
{()
=>
setShowColumnSelector
(
false
)}
onCancel
=
{()
=>
setShowColumnSelector
(
false
)}
footer
=
{
footer
=
{
<
div
className
=
'flex justify-end'
>
<
div
className
=
'flex justify-end'
>
<
Button
<
Button
onClick
=
{()
=>
initDefaultColumns
()}
>
theme
=
'light'
onClick
=
{()
=>
initDefaultColumns
()}
>
{
t
(
'重置'
)}
{
t
(
'重置'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
theme
=
'light'
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
{
t
(
'取消'
)}
{
t
(
'取消'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
type
=
'primary'
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
{
t
(
'确定'
)}
{
t
(
'确定'
)}
<
/Button
>
<
/Button
>
<
/div
>
<
/div
>
...
@@ -1222,7 +1213,7 @@ const LogsTable = () => {
...
@@ -1222,7 +1213,7 @@ const LogsTable = () => {
style
=
{{
style
=
{{
fontWeight
:
500
,
fontWeight
:
500
,
boxShadow
:
'0 2px 8px rgba(0, 0, 0, 0.1)'
,
boxShadow
:
'0 2px 8px rgba(0, 0, 0, 0.1)'
,
padding
:
1
5
,
padding
:
1
3
,
}}
}}
className
=
'!rounded-lg'
className
=
'!rounded-lg'
>
>
...
@@ -1233,7 +1224,7 @@ const LogsTable = () => {
...
@@ -1233,7 +1224,7 @@ const LogsTable = () => {
style
=
{{
style
=
{{
fontWeight
:
500
,
fontWeight
:
500
,
boxShadow
:
'0 2px 8px rgba(0, 0, 0, 0.1)'
,
boxShadow
:
'0 2px 8px rgba(0, 0, 0, 0.1)'
,
padding
:
1
5
,
padding
:
1
3
,
}}
}}
className
=
'!rounded-lg'
className
=
'!rounded-lg'
>
>
...
@@ -1245,7 +1236,7 @@ const LogsTable = () => {
...
@@ -1245,7 +1236,7 @@ const LogsTable = () => {
border
:
'none'
,
border
:
'none'
,
boxShadow
:
'0 2px 8px rgba(0, 0, 0, 0.1)'
,
boxShadow
:
'0 2px 8px rgba(0, 0, 0, 0.1)'
,
fontWeight
:
500
,
fontWeight
:
500
,
padding
:
1
5
,
padding
:
1
3
,
}}
}}
className
=
'!rounded-lg'
className
=
'!rounded-lg'
>
>
...
@@ -1254,8 +1245,7 @@ const LogsTable = () => {
...
@@ -1254,8 +1245,7 @@ const LogsTable = () => {
<
/Space
>
<
/Space
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'secondary'
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
size
=
"small"
size
=
"small"
...
@@ -1384,7 +1374,7 @@ const LogsTable = () => {
...
@@ -1384,7 +1374,7 @@ const LogsTable = () => {
<
div
className
=
'flex gap-2 w-full sm:w-auto justify-end'
>
<
div
className
=
'flex gap-2 w-full sm:w-auto justify-end'
>
<
Button
<
Button
type
=
'
prim
ary'
type
=
'
terti
ary'
htmlType
=
'submit'
htmlType
=
'submit'
loading
=
{
loading
}
loading
=
{
loading
}
size
=
"small"
size
=
"small"
...
@@ -1392,7 +1382,7 @@ const LogsTable = () => {
...
@@ -1392,7 +1382,7 @@ const LogsTable = () => {
{
t
(
'查询'
)}
{
t
(
'查询'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
t
heme
=
'light
'
t
ype
=
'tertiary
'
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
formApi
)
{
if
(
formApi
)
{
formApi
.
reset
();
formApi
.
reset
();
...
@@ -1407,7 +1397,6 @@ const LogsTable = () => {
...
@@ -1407,7 +1397,6 @@ const LogsTable = () => {
{
t
(
'重置'
)}
{
t
(
'重置'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
onClick
=
{()
=>
setShowColumnSelector
(
true
)}
onClick
=
{()
=>
setShowColumnSelector
(
true
)}
size
=
"small"
size
=
"small"
...
...
web/src/components/table/MjLogsTable.js
View file @
33f4e404
...
@@ -741,22 +741,13 @@ const LogsTable = () => {
...
@@ -741,22 +741,13 @@ const LogsTable = () => {
onCancel
=
{()
=>
setShowColumnSelector
(
false
)}
onCancel
=
{()
=>
setShowColumnSelector
(
false
)}
footer
=
{
footer
=
{
<
div
className
=
"flex justify-end"
>
<
div
className
=
"flex justify-end"
>
<
Button
<
Button
onClick
=
{()
=>
initDefaultColumns
()}
>
theme
=
"light"
onClick
=
{()
=>
initDefaultColumns
()}
>
{
t
(
'重置'
)}
{
t
(
'重置'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
theme
=
"light"
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
{
t
(
'取消'
)}
{
t
(
'取消'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
type
=
'primary'
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
{
t
(
'确定'
)}
{
t
(
'确定'
)}
<
/Button
>
<
/Button
>
<
/div
>
<
/div
>
...
@@ -831,8 +822,7 @@ const LogsTable = () => {
...
@@ -831,8 +822,7 @@ const LogsTable = () => {
)}
)}
<
/div
>
<
/div
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'secondary'
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
size
=
"small"
size
=
"small"
...
@@ -897,7 +887,7 @@ const LogsTable = () => {
...
@@ -897,7 +887,7 @@ const LogsTable = () => {
<
div
><
/div
>
<
div
><
/div
>
<
div
className
=
"flex gap-2"
>
<
div
className
=
"flex gap-2"
>
<
Button
<
Button
type
=
'
prim
ary'
type
=
'
terti
ary'
htmlType
=
'submit'
htmlType
=
'submit'
loading
=
{
loading
}
loading
=
{
loading
}
size
=
"small"
size
=
"small"
...
@@ -905,7 +895,7 @@ const LogsTable = () => {
...
@@ -905,7 +895,7 @@ const LogsTable = () => {
{
t
(
'查询'
)}
{
t
(
'查询'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
t
heme
=
'light
'
t
ype
=
'tertiary
'
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
formApi
)
{
if
(
formApi
)
{
formApi
.
reset
();
formApi
.
reset
();
...
@@ -920,7 +910,6 @@ const LogsTable = () => {
...
@@ -920,7 +910,6 @@ const LogsTable = () => {
{
t
(
'重置'
)}
{
t
(
'重置'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
onClick
=
{()
=>
setShowColumnSelector
(
true
)}
onClick
=
{()
=>
setShowColumnSelector
(
true
)}
size
=
"small"
size
=
"small"
...
...
web/src/components/table/RedemptionsTable.js
View file @
33f4e404
...
@@ -139,6 +139,7 @@ const RedemptionsTable = () => {
...
@@ -139,6 +139,7 @@ const RedemptionsTable = () => {
title
:
''
,
title
:
''
,
dataIndex
:
'operate'
,
dataIndex
:
'operate'
,
fixed
:
'right'
,
fixed
:
'right'
,
width
:
205
,
render
:
(
text
,
record
,
index
)
=>
{
render
:
(
text
,
record
,
index
)
=>
{
// 创建更多操作的下拉菜单项
// 创建更多操作的下拉菜单项
const
moreMenuItems
=
[
const
moreMenuItems
=
[
...
@@ -191,7 +192,6 @@ const RedemptionsTable = () => {
...
@@ -191,7 +192,6 @@ const RedemptionsTable = () => {
<
Space
>
<
Space
>
<
Popover
content
=
{
record
.
key
}
style
=
{{
padding
:
20
}}
position
=
'top'
>
<
Popover
content
=
{
record
.
key
}
style
=
{{
padding
:
20
}}
position
=
'top'
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
size
=
"small"
size
=
"small"
>
>
...
@@ -199,8 +199,6 @@ const RedemptionsTable = () => {
...
@@ -199,8 +199,6 @@ const RedemptionsTable = () => {
<
/Button
>
<
/Button
>
<
/Popover
>
<
/Popover
>
<
Button
<
Button
theme
=
'light'
type
=
'secondary'
size
=
"small"
size
=
"small"
onClick
=
{
async
()
=>
{
onClick
=
{
async
()
=>
{
await
copyText
(
record
.
key
);
await
copyText
(
record
.
key
);
...
@@ -209,7 +207,6 @@ const RedemptionsTable = () => {
...
@@ -209,7 +207,6 @@ const RedemptionsTable = () => {
{
t
(
'复制'
)}
{
t
(
'复制'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
size
=
"small"
size
=
"small"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
...
@@ -226,7 +223,6 @@ const RedemptionsTable = () => {
...
@@ -226,7 +223,6 @@ const RedemptionsTable = () => {
menu
=
{
moreMenuItems
}
menu
=
{
moreMenuItems
}
>
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
size
=
"small"
size
=
"small"
icon
=
{
<
IconMore
/>
}
icon
=
{
<
IconMore
/>
}
...
@@ -435,8 +431,7 @@ const RedemptionsTable = () => {
...
@@ -435,8 +431,7 @@ const RedemptionsTable = () => {
<
Text
>
{
t
(
'兑换码可以批量生成和分发,适合用于推广活动或批量充值。'
)}
<
/Text
>
<
Text
>
{
t
(
'兑换码可以批量生成和分发,适合用于推广活动或批量充值。'
)}
<
/Text
>
<
/div
>
<
/div
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'secondary'
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
size
=
"small"
size
=
"small"
...
@@ -452,7 +447,6 @@ const RedemptionsTable = () => {
...
@@ -452,7 +447,6 @@ const RedemptionsTable = () => {
<
div
className
=
"flex flex-col sm:flex-row gap-2 w-full md:w-auto order-2 md:order-1"
>
<
div
className
=
"flex flex-col sm:flex-row gap-2 w-full md:w-auto order-2 md:order-1"
>
<
div
className
=
"flex gap-2 w-full sm:w-auto"
>
<
div
className
=
"flex gap-2 w-full sm:w-auto"
>
<
Button
<
Button
theme
=
'light'
type
=
'primary'
type
=
'primary'
className
=
"w-full sm:w-auto"
className
=
"w-full sm:w-auto"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
...
@@ -466,7 +460,7 @@ const RedemptionsTable = () => {
...
@@ -466,7 +460,7 @@ const RedemptionsTable = () => {
{
t
(
'添加兑换码'
)}
{
t
(
'添加兑换码'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
type
=
'
warning
'
type
=
'
tertiary
'
className
=
"w-full sm:w-auto"
className
=
"w-full sm:w-auto"
onClick
=
{
async
()
=>
{
onClick
=
{
async
()
=>
{
if
(
selectedKeys
.
length
===
0
)
{
if
(
selectedKeys
.
length
===
0
)
{
...
@@ -539,7 +533,7 @@ const RedemptionsTable = () => {
...
@@ -539,7 +533,7 @@ const RedemptionsTable = () => {
<
/div
>
<
/div
>
<
div
className
=
"flex gap-2 w-full md:w-auto"
>
<
div
className
=
"flex gap-2 w-full md:w-auto"
>
<
Button
<
Button
type
=
"
prim
ary"
type
=
"
terti
ary"
htmlType
=
"submit"
htmlType
=
"submit"
loading
=
{
loading
||
searching
}
loading
=
{
loading
||
searching
}
className
=
"flex-1 md:flex-initial md:w-auto"
className
=
"flex-1 md:flex-initial md:w-auto"
...
@@ -548,7 +542,7 @@ const RedemptionsTable = () => {
...
@@ -548,7 +542,7 @@ const RedemptionsTable = () => {
{
t
(
'查询'
)}
{
t
(
'查询'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
t
heme
=
"light
"
t
ype
=
"tertiary
"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
formApi
)
{
if
(
formApi
)
{
formApi
.
reset
();
formApi
.
reset
();
...
...
web/src/components/table/TaskLogsTable.js
View file @
33f4e404
...
@@ -595,22 +595,13 @@ const LogsTable = () => {
...
@@ -595,22 +595,13 @@ const LogsTable = () => {
onCancel
=
{()
=>
setShowColumnSelector
(
false
)}
onCancel
=
{()
=>
setShowColumnSelector
(
false
)}
footer
=
{
footer
=
{
<
div
className
=
"flex justify-end"
>
<
div
className
=
"flex justify-end"
>
<
Button
<
Button
onClick
=
{()
=>
initDefaultColumns
()}
>
theme
=
"light"
onClick
=
{()
=>
initDefaultColumns
()}
>
{
t
(
'重置'
)}
{
t
(
'重置'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
theme
=
"light"
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
{
t
(
'取消'
)}
{
t
(
'取消'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
type
=
'primary'
onClick
=
{()
=>
setShowColumnSelector
(
false
)}
>
{
t
(
'确定'
)}
{
t
(
'确定'
)}
<
/Button
>
<
/Button
>
<
/div
>
<
/div
>
...
@@ -667,8 +658,7 @@ const LogsTable = () => {
...
@@ -667,8 +658,7 @@ const LogsTable = () => {
<
Text
>
{
t
(
'任务记录'
)}
<
/Text
>
<
Text
>
{
t
(
'任务记录'
)}
<
/Text
>
<
/div
>
<
/div
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'secondary'
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
size
=
"small"
size
=
"small"
...
@@ -733,7 +723,7 @@ const LogsTable = () => {
...
@@ -733,7 +723,7 @@ const LogsTable = () => {
<
div
><
/div
>
<
div
><
/div
>
<
div
className
=
"flex gap-2"
>
<
div
className
=
"flex gap-2"
>
<
Button
<
Button
type
=
'
prim
ary'
type
=
'
terti
ary'
htmlType
=
'submit'
htmlType
=
'submit'
loading
=
{
loading
}
loading
=
{
loading
}
size
=
"small"
size
=
"small"
...
@@ -741,7 +731,7 @@ const LogsTable = () => {
...
@@ -741,7 +731,7 @@ const LogsTable = () => {
{
t
(
'查询'
)}
{
t
(
'查询'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
t
heme
=
'light
'
t
ype
=
'tertiary
'
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
formApi
)
{
if
(
formApi
)
{
formApi
.
reset
();
formApi
.
reset
();
...
@@ -756,7 +746,6 @@ const LogsTable = () => {
...
@@ -756,7 +746,6 @@ const LogsTable = () => {
{
t
(
'重置'
)}
{
t
(
'重置'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
onClick
=
{()
=>
setShowColumnSelector
(
true
)}
onClick
=
{()
=>
setShowColumnSelector
(
true
)}
size
=
"small"
size
=
"small"
...
...
web/src/components/table/TokensTable.js
View file @
33f4e404
...
@@ -372,9 +372,8 @@ const TokensTable = () => {
...
@@ -372,9 +372,8 @@ const TokensTable = () => {
aria
-
label
=
{
t
(
'项目操作按钮组'
)}
aria
-
label
=
{
t
(
'项目操作按钮组'
)}
>
>
<
Button
<
Button
theme
=
'light'
size
=
"small"
size
=
"small"
style
=
{{
color
:
'rgba(var(--semi-teal-7), 1)'
}}
type
=
'tertiary'
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
chatsArray
.
length
===
0
)
{
if
(
chatsArray
.
length
===
0
)
{
showError
(
t
(
'请联系管理员配置聊天链接'
));
showError
(
t
(
'请联系管理员配置聊天链接'
));
...
@@ -395,11 +394,7 @@ const TokensTable = () => {
...
@@ -395,11 +394,7 @@ const TokensTable = () => {
menu
=
{
chatsArray
}
menu
=
{
chatsArray
}
>
>
<
Button
<
Button
style
=
{{
type
=
'tertiary'
padding
:
'4px 4px'
,
color
:
'rgba(var(--semi-teal-7), 1)'
,
}}
type
=
'primary'
icon
=
{
<
IconTreeTriangleDown
/>
}
icon
=
{
<
IconTreeTriangleDown
/>
}
size
=
"small"
size
=
"small"
><
/Button
>
><
/Button
>
...
@@ -407,7 +402,6 @@ const TokensTable = () => {
...
@@ -407,7 +402,6 @@ const TokensTable = () => {
<
/SplitButtonGroup
>
<
/SplitButtonGroup
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
size
=
"small"
size
=
"small"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
...
@@ -419,7 +413,6 @@ const TokensTable = () => {
...
@@ -419,7 +413,6 @@ const TokensTable = () => {
<
/Button
>
<
/Button
>
<
Button
<
Button
theme
=
'light'
type
=
'danger'
type
=
'danger'
size
=
"small"
size
=
"small"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
...
@@ -705,8 +698,7 @@ const TokensTable = () => {
...
@@ -705,8 +698,7 @@ const TokensTable = () => {
<
Text
>
{
t
(
'令牌用于API访问认证,可以设置额度限制和模型权限。'
)}
<
/Text
>
<
Text
>
{
t
(
'令牌用于API访问认证,可以设置额度限制和模型权限。'
)}
<
/Text
>
<
/div
>
<
/div
>
<
Button
<
Button
theme
=
"light"
type
=
"tertiary"
type
=
"secondary"
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
size
=
"small"
size
=
"small"
...
@@ -721,7 +713,6 @@ const TokensTable = () => {
...
@@ -721,7 +713,6 @@ const TokensTable = () => {
<
div
className
=
"flex flex-col md:flex-row justify-between items-center gap-4 w-full"
>
<
div
className
=
"flex flex-col md:flex-row justify-between items-center gap-4 w-full"
>
<
div
className
=
"flex flex-wrap gap-2 w-full md:w-auto order-2 md:order-1"
>
<
div
className
=
"flex flex-wrap gap-2 w-full md:w-auto order-2 md:order-1"
>
<
Button
<
Button
theme
=
"light"
type
=
"primary"
type
=
"primary"
className
=
"flex-1 md:flex-initial"
className
=
"flex-1 md:flex-initial"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
...
@@ -735,8 +726,7 @@ const TokensTable = () => {
...
@@ -735,8 +726,7 @@ const TokensTable = () => {
{
t
(
'添加令牌'
)}
{
t
(
'添加令牌'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
theme
=
"light"
type
=
'tertiary'
type
=
"warning"
className
=
"flex-1 md:flex-initial"
className
=
"flex-1 md:flex-initial"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
selectedKeys
.
length
===
0
)
{
if
(
selectedKeys
.
length
===
0
)
{
...
@@ -750,8 +740,7 @@ const TokensTable = () => {
...
@@ -750,8 +740,7 @@ const TokensTable = () => {
footer
:
(
footer
:
(
<
Space
>
<
Space
>
<
Button
<
Button
type
=
"primary"
type
=
'tertiary'
theme
=
"solid"
onClick
=
{
async
()
=>
{
onClick
=
{
async
()
=>
{
let
content
=
''
;
let
content
=
''
;
for
(
let
i
=
0
;
i
<
selectedKeys
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
selectedKeys
.
length
;
i
++
)
{
...
@@ -765,7 +754,6 @@ const TokensTable = () => {
...
@@ -765,7 +754,6 @@ const TokensTable = () => {
{
t
(
'名称+密钥'
)}
{
t
(
'名称+密钥'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
theme
=
"light"
onClick
=
{
async
()
=>
{
onClick
=
{
async
()
=>
{
let
content
=
''
;
let
content
=
''
;
for
(
let
i
=
0
;
i
<
selectedKeys
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
selectedKeys
.
length
;
i
++
)
{
...
@@ -786,8 +774,7 @@ const TokensTable = () => {
...
@@ -786,8 +774,7 @@ const TokensTable = () => {
{
t
(
'复制所选令牌'
)}
{
t
(
'复制所选令牌'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
theme
=
"light"
type
=
'danger'
type
=
"danger"
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
selectedKeys
.
length
===
0
)
{
if
(
selectedKeys
.
length
===
0
)
{
...
@@ -844,7 +831,7 @@ const TokensTable = () => {
...
@@ -844,7 +831,7 @@ const TokensTable = () => {
<
/div
>
<
/div
>
<
div
className
=
"flex gap-2 w-full md:w-auto"
>
<
div
className
=
"flex gap-2 w-full md:w-auto"
>
<
Button
<
Button
type
=
"
prim
ary"
type
=
"
terti
ary"
htmlType
=
"submit"
htmlType
=
"submit"
loading
=
{
loading
||
searching
}
loading
=
{
loading
||
searching
}
className
=
"flex-1 md:flex-initial md:w-auto"
className
=
"flex-1 md:flex-initial md:w-auto"
...
@@ -853,7 +840,7 @@ const TokensTable = () => {
...
@@ -853,7 +840,7 @@ const TokensTable = () => {
{
t
(
'查询'
)}
{
t
(
'查询'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
t
heme
=
"light"
t
ype
=
'tertiary'
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
formApi
)
{
if
(
formApi
)
{
formApi
.
reset
();
formApi
.
reset
();
...
...
web/src/components/table/UsersTable.js
View file @
33f4e404
...
@@ -287,7 +287,6 @@ const UsersTable = () => {
...
@@ -287,7 +287,6 @@ const UsersTable = () => {
return
(
return
(
<
Space
>
<
Space
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
size
=
"small"
size
=
"small"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
...
@@ -303,7 +302,6 @@ const UsersTable = () => {
...
@@ -303,7 +302,6 @@ const UsersTable = () => {
menu
=
{
moreMenuItems
}
menu
=
{
moreMenuItems
}
>
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'tertiary'
size
=
"small"
size
=
"small"
icon
=
{
<
IconMore
/>
}
icon
=
{
<
IconMore
/>
}
...
@@ -525,8 +523,7 @@ const UsersTable = () => {
...
@@ -525,8 +523,7 @@ const UsersTable = () => {
<
Text
>
{
t
(
'用户管理页面,可以查看和管理所有注册用户的信息、权限和状态。'
)}
<
/Text
>
<
Text
>
{
t
(
'用户管理页面,可以查看和管理所有注册用户的信息、权限和状态。'
)}
<
/Text
>
<
/div
>
<
/div
>
<
Button
<
Button
theme
=
'light'
type
=
'tertiary'
type
=
'secondary'
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
onClick
=
{()
=>
setCompactMode
(
!
compactMode
)}
size
=
"small"
size
=
"small"
...
@@ -541,8 +538,6 @@ const UsersTable = () => {
...
@@ -541,8 +538,6 @@ const UsersTable = () => {
<
div
className
=
"flex flex-col md:flex-row justify-between items-center gap-4 w-full"
>
<
div
className
=
"flex flex-col md:flex-row justify-between items-center gap-4 w-full"
>
<
div
className
=
"flex gap-2 w-full md:w-auto order-2 md:order-1"
>
<
div
className
=
"flex gap-2 w-full md:w-auto order-2 md:order-1"
>
<
Button
<
Button
theme
=
'light'
type
=
'primary'
className
=
"w-full md:w-auto"
className
=
"w-full md:w-auto"
onClick
=
{()
=>
{
onClick
=
{()
=>
{
setShowAddUser
(
true
);
setShowAddUser
(
true
);
...
@@ -598,7 +593,7 @@ const UsersTable = () => {
...
@@ -598,7 +593,7 @@ const UsersTable = () => {
<
/div
>
<
/div
>
<
div
className
=
"flex gap-2 w-full md:w-auto"
>
<
div
className
=
"flex gap-2 w-full md:w-auto"
>
<
Button
<
Button
type
=
"
prim
ary"
type
=
"
terti
ary"
htmlType
=
"submit"
htmlType
=
"submit"
loading
=
{
loading
||
searching
}
loading
=
{
loading
||
searching
}
className
=
"flex-1 md:flex-initial md:w-auto"
className
=
"flex-1 md:flex-initial md:w-auto"
...
@@ -607,7 +602,7 @@ const UsersTable = () => {
...
@@ -607,7 +602,7 @@ const UsersTable = () => {
{
t
(
'查询'
)}
{
t
(
'查询'
)}
<
/Button
>
<
/Button
>
<
Button
<
Button
t
heme
=
"light"
t
ype
=
'tertiary'
onClick
=
{()
=>
{
onClick
=
{()
=>
{
if
(
formApi
)
{
if
(
formApi
)
{
formApi
.
reset
();
formApi
.
reset
();
...
...
web/src/helpers/render.js
View file @
33f4e404
...
@@ -53,18 +53,18 @@ import {
...
@@ -53,18 +53,18 @@ import {
// 侧边栏图标颜色映射
// 侧边栏图标颜色映射
export
const
sidebarIconColors
=
{
export
const
sidebarIconColors
=
{
dashboard
:
'#
4F46E5'
,
// 紫蓝
色
dashboard
:
'#
10B981'
,
// 绿
色
terminal
:
'#10B981'
,
// 绿色
terminal
:
'#10B981'
,
// 绿色
message
:
'#06B6D4'
,
// 青色
message
:
'#06B6D4'
,
// 青色
key
:
'#3B82F6'
,
// 蓝色
key
:
'#3B82F6'
,
// 蓝色
chart
:
'#
8B5CF6'
,
// 紫
色
chart
:
'#
F59E0B'
,
// 琥珀
色
image
:
'#EC4899'
,
// 粉色
image
:
'#EC4899'
,
// 粉色
check
:
'#F59E0B'
,
// 琥珀色
check
:
'#F59E0B'
,
// 琥珀色
credit
:
'#F97316'
,
// 橙色
credit
:
'#F97316'
,
// 橙色
layers
:
'#EF4444'
,
// 红色
layers
:
'#EF4444'
,
// 红色
gift
:
'#F43F5E'
,
// 玫红色
gift
:
'#F43F5E'
,
// 玫红色
user
:
'#
6366F1'
,
// 靛蓝
色
user
:
'#
10B981'
,
// 绿
色
settings
:
'#
6B7280'
,
// 灰
色
settings
:
'#
F97316'
,
// 橙
色
};
};
// 获取侧边栏Lucide图标组件
// 获取侧边栏Lucide图标组件
...
...
web/src/index.css
View file @
33f4e404
...
@@ -59,6 +59,11 @@ code {
...
@@ -59,6 +59,11 @@ code {
.semi-navigation-item
{
.semi-navigation-item
{
margin-bottom
:
4px
!important
;
margin-bottom
:
4px
!important
;
padding
:
4px
12px
!important
;
}
.semi-navigation-sub-title
{
padding
:
0
!important
;
}
}
.semi-navigation-item-icon
{
.semi-navigation-item-icon
{
...
@@ -70,6 +75,7 @@ code {
...
@@ -70,6 +75,7 @@ code {
margin-right
:
0
;
margin-right
:
0
;
}
}
.semi-navigation-item
,
.semi-navigation-sub-title
{
.semi-navigation-sub-title
{
height
:
100%
!important
;
height
:
100%
!important
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment