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
e873c305
authored
Jun 23, 2023
by
JustSong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: show used quota in token table
parent
24bdbe11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
web/src/components/TokensTable.js
+10
-1
No files found.
web/src/components/TokensTable.js
View file @
e873c305
...
@@ -184,10 +184,18 @@ const TokensTable = () => {
...
@@ -184,10 +184,18 @@ const TokensTable = () => {
<
Table
.
HeaderCell
<
Table
.
HeaderCell
style
=
{{
cursor
:
'pointer'
}}
style
=
{{
cursor
:
'pointer'
}}
onClick
=
{()
=>
{
onClick
=
{()
=>
{
sortToken
(
'used_quota'
);
}}
>
已用额度
<
/Table.HeaderCell
>
<
Table
.
HeaderCell
style
=
{{
cursor
:
'pointer'
}}
onClick
=
{()
=>
{
sortToken
(
'remain_quota'
);
sortToken
(
'remain_quota'
);
}}
}}
>
>
额度
剩余
额度
<
/Table.HeaderCell
>
<
/Table.HeaderCell
>
<
Table
.
HeaderCell
<
Table
.
HeaderCell
style
=
{{
cursor
:
'pointer'
}}
style
=
{{
cursor
:
'pointer'
}}
...
@@ -221,6 +229,7 @@ const TokensTable = () => {
...
@@ -221,6 +229,7 @@ const TokensTable = () => {
<
Table
.
Row
key
=
{
token
.
id
}
>
<
Table
.
Row
key
=
{
token
.
id
}
>
<
Table
.
Cell
>
{
token
.
name
?
token
.
name
:
'无'
}
<
/Table.Cell
>
<
Table
.
Cell
>
{
token
.
name
?
token
.
name
:
'无'
}
<
/Table.Cell
>
<
Table
.
Cell
>
{
renderStatus
(
token
.
status
)}
<
/Table.Cell
>
<
Table
.
Cell
>
{
renderStatus
(
token
.
status
)}
<
/Table.Cell
>
<
Table
.
Cell
>
{
renderQuota
(
token
.
used_quota
)}
<
/Table.Cell
>
<
Table
.
Cell
>
{
token
.
unlimited_quota
?
'无限制'
:
renderQuota
(
token
.
remain_quota
,
2
)}
<
/Table.Cell
>
<
Table
.
Cell
>
{
token
.
unlimited_quota
?
'无限制'
:
renderQuota
(
token
.
remain_quota
,
2
)}
<
/Table.Cell
>
<
Table
.
Cell
>
{
renderTimestamp
(
token
.
created_time
)}
<
/Table.Cell
>
<
Table
.
Cell
>
{
renderTimestamp
(
token
.
created_time
)}
<
/Table.Cell
>
<
Table
.
Cell
>
{
token
.
expired_time
===
-
1
?
'永不过期'
:
renderTimestamp
(
token
.
expired_time
)}
<
/Table.Cell
>
<
Table
.
Cell
>
{
token
.
expired_time
===
-
1
?
'永不过期'
:
renderTimestamp
(
token
.
expired_time
)}
<
/Table.Cell
>
...
...
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