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
bfcb9b88
authored
May 15, 2023
by
JustSong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: double check before deletion
parent
9985553b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
18 deletions
+38
-18
web/src/components/ChannelsTable.js
+19
-9
web/src/components/TokensTable.js
+19
-9
No files found.
web/src/components/ChannelsTable.js
View file @
bfcb9b88
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Button
,
Form
,
Label
,
Pagination
,
Table
}
from
'semantic-ui-react'
;
import
{
Button
,
Form
,
Label
,
Pagination
,
Popup
,
Table
}
from
'semantic-ui-react'
;
import
{
Link
}
from
'react-router-dom'
;
import
{
API
,
copy
,
showError
,
showSuccess
,
timestamp2string
}
from
'../helpers'
;
...
...
@@ -244,15 +244,25 @@ const ChannelsTable = () => {
<
Table
.
Cell
>
{
renderTimestamp
(
channel
.
accessed_time
)}
<
/Table.Cell
>
<
Table
.
Cell
>
<
div
>
<
Button
size
=
{
'small'
}
negative
onClick
=
{()
=>
{
manageChannel
(
channel
.
id
,
'delete'
,
idx
);
}}
<
Popup
trigger
=
{
<
Button
size
=
'small'
negative
>
删除
<
/Button
>
}
on
=
'click'
flowing
hoverable
>
删除
<
/Button
>
<
Button
negative
onClick
=
{()
=>
{
manageChannel
(
channel
.
id
,
'delete'
,
idx
);
}}
>
删除渠道
{
channel
.
name
}
<
/Button
>
<
/Popup
>
<
Button
size
=
{
'small'
}
onClick
=
{()
=>
{
...
...
web/src/components/TokensTable.js
View file @
bfcb9b88
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Button
,
Form
,
Label
,
Modal
,
Pagination
,
Table
}
from
'semantic-ui-react'
;
import
{
Button
,
Form
,
Label
,
Modal
,
Pagination
,
Popup
,
Table
}
from
'semantic-ui-react'
;
import
{
Link
}
from
'react-router-dom'
;
import
{
API
,
copy
,
showError
,
showSuccess
,
showWarning
,
timestamp2string
}
from
'../helpers'
;
...
...
@@ -283,15 +283,25 @@ const TokensTable = () => {
}}
>
充值
<
/Button
>
<
Button
size
=
{
'small'
}
negative
onClick
=
{()
=>
{
manageToken
(
token
.
id
,
'delete'
,
idx
);
}}
<
Popup
trigger
=
{
<
Button
size
=
'small'
negative
>
删除
<
/Button
>
}
on
=
'click'
flowing
hoverable
>
删除
<
/Button
>
<
Button
negative
onClick
=
{()
=>
{
manageToken
(
token
.
id
,
'delete'
,
idx
);
}}
>
删除令牌
{
token
.
name
}
<
/Button
>
<
/Popup
>
<
Button
size
=
{
'small'
}
onClick
=
{()
=>
{
...
...
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