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
eded2213
authored
May 10, 2023
by
JustSong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: double check before deleting a user
parent
ac2a56f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
web/src/components/UsersTable.js
+19
-9
No files found.
web/src/components/UsersTable.js
View file @
eded2213
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
,
showError
,
showSuccess
}
from
'../helpers'
;
...
...
@@ -237,15 +237,25 @@ const UsersTable = () => {
>
降级
<
/Button
>
<
Button
size
=
{
'small'
}
negative
onClick
=
{()
=>
{
manageUser
(
user
.
username
,
'delete'
,
idx
);
}}
<
Popup
trigger
=
{
<
Button
size
=
'small'
negative
>
删除
<
/Button
>
}
on
=
'click'
flowing
hoverable
>
删除
<
/Button
>
<
Button
negative
onClick
=
{()
=>
{
manageUser
(
user
.
username
,
'delete'
,
idx
);
}}
>
删除用户
{
user
.
username
}
<
/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