Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
fd442556
Commit
fd442556
authored
Aug 06, 2022
by
boojack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: use dropdown in member section
parent
84564891
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
34 deletions
+20
-34
MemberSection.tsx
web/src/components/Settings/MemberSection.tsx
+13
-13
member-section.less
web/src/less/settings/member-section.less
+7
-21
No files found.
web/src/components/Settings/MemberSection.tsx
View file @
fd442556
...
...
@@ -4,6 +4,7 @@ import { userService } from "../../services";
import
{
useAppSelector
}
from
"../../store"
;
import
*
as
api
from
"../../helpers/api"
;
import
toastHelper
from
"../Toast"
;
import
Dropdown
from
"../common/Dropdown"
;
import
{
showCommonDialog
}
from
"../Dialog/CommonDialog"
;
import
"../../less/settings/member-section.less"
;
...
...
@@ -136,21 +137,20 @@ const PreferencesSection: React.FC<Props> = () => {
<
div
className=
"buttons-container"
>
{
currentUser
?.
id
===
user
.
id
?
(
<
span
className=
"tip-text"
>
Yourself
</
span
>
)
:
user
.
rowStatus
===
"NORMAL"
?
(
<
span
className=
"btn archive"
onClick=
{
()
=>
handleArchiveUserClick
(
user
)
}
>
archive
</
spa
n
>
)
:
(
<
Dropdown
className=
"actions-dropdown"
>
{
user
.
rowStatus
===
"NORMAL"
?
(
<
button
onClick=
{
()
=>
handleArchiveUserClick
(
user
)
}
>
Archive
</
butto
n
>
)
:
(
<>
<
span
className=
"btn restore"
onClick=
{
()
=>
handleRestoreUserClick
(
user
)
}
>
restore
</
span
>
<
span
className=
"split-line"
>
/
</
span
>
<
span
className=
"btn delete"
onClick=
{
()
=>
handleDeleteUserClick
(
user
)
}
>
delete
</
span
>
<
button
onClick=
{
()
=>
handleRestoreUserClick
(
user
)
}
>
Restore
</
button
>
<
button
className=
"delete"
onClick=
{
()
=>
handleDeleteUserClick
(
user
)
}
>
Delete
</
button
>
</>
)
}
</
Dropdown
>
)
}
</
div
>
</
div
>
))
}
...
...
web/src/less/settings/member-section.less
View file @
fd442556
...
...
@@ -32,7 +32,7 @@
}
> .member-container {
@apply w-full grid grid-cols-
6
border-b py-2;
@apply w-full grid grid-cols-
4
border-b py-2;
> .field-text {
@apply text-base pl-2 mr-4 w-16 truncate;
...
...
@@ -42,35 +42,21 @@
}
&.email-text {
@apply w-auto col-span-
3
;
@apply w-auto col-span-
2
;
}
}
> .buttons-container {
@apply col-span-2 flex flex-row justify-start items-center flex-wrap;
> .btn {
@apply px-2 leading-7 border rounded shadow hover:opacity-80;
&.archive {
@apply bg-yellow-100 text-yellow-600;
}
&.restore {
@apply bg-green-100 text-green-600;
}
&.delete {
@apply bg-red-100 text-red-600;
}
}
@apply col-span-1 flex flex-row justify-end items-center;
> .tip-text {
@apply text-gray-400;
}
> .split-line {
@apply font-mono text-gray-300 mx-1;
> .actions-dropdown {
.delete {
@apply text-red-600;
}
}
}
}
...
...
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