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
e22e41c9
authored
Nov 12, 2024
by
licoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化数据管理操作栏均为顶部
parent
fac2f50b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
88 deletions
+94
-88
web/src/components/ChannelsTable.js
+0
-0
web/src/components/LogsTable.js
+16
-14
web/src/components/RedemptionsTable.js
+34
-31
web/src/components/TokensTable.js
+35
-32
web/src/components/UsersTable.js
+9
-11
No files found.
web/src/components/ChannelsTable.js
View file @
e22e41c9
This diff is collapsed.
Click to expand it.
web/src/components/LogsTable.js
View file @
e22e41c9
...
...
@@ -767,6 +767,22 @@ const LogsTable = () => {
<
Form
.
Section
><
/Form.Section
>
<
/
>
<
/Form
>
<
div
style
=
{{
marginTop
:
10
}}
>
<
Select
defaultValue
=
'0'
style
=
{{
width
:
120
}}
onChange
=
{(
value
)
=>
{
setLogType
(
parseInt
(
value
));
loadLogs
(
0
,
pageSize
,
parseInt
(
value
));
}}
>
<
Select
.
Option
value
=
'0'
>
全部
<
/Select.Option
>
<
Select
.
Option
value
=
'1'
>
充值
<
/Select.Option
>
<
Select
.
Option
value
=
'2'
>
消费
<
/Select.Option
>
<
Select
.
Option
value
=
'3'
>
管理
<
/Select.Option
>
<
Select
.
Option
value
=
'4'
>
系统
<
/Select.Option
>
<
/Select
>
<
/div
>
<
Table
style
=
{{
marginTop
:
5
}}
columns
=
{
columns
}
...
...
@@ -786,20 +802,6 @@ const LogsTable = () => {
onPageChange
:
handlePageChange
,
}}
/
>
<
Select
defaultValue
=
'0'
style
=
{{
width
:
120
}}
onChange
=
{(
value
)
=>
{
setLogType
(
parseInt
(
value
));
loadLogs
(
0
,
pageSize
,
parseInt
(
value
));
}}
>
<
Select
.
Option
value
=
'0'
>
全部
<
/Select.Option
>
<
Select
.
Option
value
=
'1'
>
充值
<
/Select.Option
>
<
Select
.
Option
value
=
'2'
>
消费
<
/Select.Option
>
<
Select
.
Option
value
=
'3'
>
管理
<
/Select.Option
>
<
Select
.
Option
value
=
'4'
>
系统
<
/Select.Option
>
<
/Select
>
<
/Layout
>
<
/
>
);
...
...
web/src/components/RedemptionsTable.js
View file @
e22e41c9
...
...
@@ -10,7 +10,7 @@ import {
import
{
ITEMS_PER_PAGE
}
from
'../constants'
;
import
{
renderQuota
}
from
'../helpers/render'
;
import
{
Button
,
Button
,
Divider
,
Form
,
Modal
,
Popconfirm
,
...
...
@@ -391,6 +391,39 @@ const RedemptionsTable = () => {
onChange
=
{
handleKeywordChange
}
/
>
<
/Form
>
<
Divider
style
=
{{
margin
:
'5px 0 15px 0'
}}
/
>
<
div
>
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{()
=>
{
setEditingRedemption
({
id
:
undefined
,
});
setShowEdit
(
true
);
}}
>
添加兑换码
<
/Button
>
<
Button
label
=
'复制所选兑换码'
type
=
'warning'
onClick
=
{
async
()
=>
{
if
(
selectedKeys
.
length
===
0
)
{
showError
(
'请至少选择一个兑换码!'
);
return
;
}
let
keys
=
''
;
for
(
let
i
=
0
;
i
<
selectedKeys
.
length
;
i
++
)
{
keys
+=
selectedKeys
[
i
].
name
+
' '
+
selectedKeys
[
i
].
key
+
'\n'
;
}
await
copyText
(
keys
);
}}
>
复制所选兑换码到剪贴板
<
/Button
>
<
/div
>
<
Table
style
=
{{
marginTop
:
20
}}
...
...
@@ -414,36 +447,6 @@ const RedemptionsTable = () => {
rowSelection
=
{
rowSelection
}
onRow
=
{
handleRow
}
><
/Table
>
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{()
=>
{
setEditingRedemption
({
id
:
undefined
,
});
setShowEdit
(
true
);
}}
>
添加兑换码
<
/Button
>
<
Button
label
=
'复制所选兑换码'
type
=
'warning'
onClick
=
{
async
()
=>
{
if
(
selectedKeys
.
length
===
0
)
{
showError
(
'请至少选择一个兑换码!'
);
return
;
}
let
keys
=
''
;
for
(
let
i
=
0
;
i
<
selectedKeys
.
length
;
i
++
)
{
keys
+=
selectedKeys
[
i
].
name
+
' '
+
selectedKeys
[
i
].
key
+
'\n'
;
}
await
copyText
(
keys
);
}}
>
复制所选兑换码到剪贴板
<
/Button
>
<
/
>
);
};
...
...
web/src/components/TokensTable.js
View file @
e22e41c9
...
...
@@ -10,7 +10,7 @@ import {
import
{
ITEMS_PER_PAGE
}
from
'../constants'
;
import
{
renderGroup
,
renderQuota
}
from
'../helpers/render'
;
import
{
Button
,
Button
,
Divider
,
Dropdown
,
Form
,
Modal
,
...
...
@@ -596,6 +596,40 @@ const TokensTable = () => {
查询
<
/Button
>
<
/Form
>
<
Divider
style
=
{{
margin
:
'15px 0'
}}
/
>
<
div
>
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{()
=>
{
setEditingToken
({
id
:
undefined
,
});
setShowEdit
(
true
);
}}
>
添加令牌
<
/Button
>
<
Button
label
=
'复制所选令牌'
type
=
'warning'
onClick
=
{
async
()
=>
{
if
(
selectedKeys
.
length
===
0
)
{
showError
(
'请至少选择一个令牌!'
);
return
;
}
let
keys
=
''
;
for
(
let
i
=
0
;
i
<
selectedKeys
.
length
;
i
++
)
{
keys
+=
selectedKeys
[
i
].
name
+
' sk-'
+
selectedKeys
[
i
].
key
+
'\n'
;
}
await
copyText
(
keys
);
}}
>
复制所选令牌到剪贴板
<
/Button
>
<
/div
>
<
Table
style
=
{{
marginTop
:
20
}}
...
...
@@ -619,37 +653,6 @@ const TokensTable = () => {
rowSelection
=
{
rowSelection
}
onRow
=
{
handleRow
}
><
/Table
>
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{()
=>
{
setEditingToken
({
id
:
undefined
,
});
setShowEdit
(
true
);
}}
>
添加令牌
<
/Button
>
<
Button
label
=
'复制所选令牌'
type
=
'warning'
onClick
=
{
async
()
=>
{
if
(
selectedKeys
.
length
===
0
)
{
showError
(
'请至少选择一个令牌!'
);
return
;
}
let
keys
=
''
;
for
(
let
i
=
0
;
i
<
selectedKeys
.
length
;
i
++
)
{
keys
+=
selectedKeys
[
i
].
name
+
' sk-'
+
selectedKeys
[
i
].
key
+
'\n'
;
}
await
copyText
(
keys
);
}}
>
复制所选令牌到剪贴板
<
/Button
>
<
/
>
);
};
...
...
web/src/components/UsersTable.js
View file @
e22e41c9
...
...
@@ -476,10 +476,18 @@ const UsersTable = () => {
type
=
'primary'
htmlType
=
'submit'
className
=
'btn-margin-right'
style
=
{{
marginRight
:
8
}}
>
查询
<
/Button
>
<
Button
theme
=
'light'
type
=
'primary'
onClick
=
{()
=>
{
setShowAddUser
(
true
);
}}
>
添加用户
<
/Button
>
<
/Space
>
<
/div
>
<
/Form
>
...
...
@@ -496,16 +504,6 @@ const UsersTable = () => {
}}
loading
=
{
loading
}
/
>
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{()
=>
{
setShowAddUser
(
true
);
}}
>
添加用户
<
/Button
>
<
/
>
);
};
...
...
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