Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
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
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
72dc229d
Commit
72dc229d
authored
Oct 13, 2022
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Jan 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update shared components in `ModerationBanner`
parent
230186fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
ModerationBanner.js
src/sidebar/components/ModerationBanner.js
+17
-6
No files found.
src/sidebar/components/ModerationBanner.js
View file @
72dc229d
import
{
Icon
,
LabeledButton
}
from
'@hypothesis/frontend-shared'
;
import
{
ButtonBase
,
FlagIcon
,
HideIcon
,
}
from
'@hypothesis/frontend-shared/lib/next'
;
import
classnames
from
'classnames'
;
import
{
useSidebarStore
}
from
'../store'
;
...
...
@@ -88,7 +92,11 @@ function ModerationBanner({ annotation, api, toastMessenger }) {
'bg-grey-6'
:
annotation
.
hidden
,
})}
>
<
Icon
name
=
{
annotation
.
hidden
?
'hide'
:
'flag'
}
/
>
{
annotation
.
hidden
?
(
<
HideIcon
className
=
"w-em h-em"
/>
)
:
(
<
FlagIcon
className
=
"w-em h-em"
/>
)}
<
/div
>
<
div
className
=
"self-center grow"
>
{
!
annotation
.
hidden
&&
(
...
...
@@ -100,18 +108,21 @@ function ModerationBanner({ annotation, api, toastMessenger }) {
{
annotation
.
hidden
&&
<
span
>
Hidden
from
users
<
/span>
}
<
/div
>
<
div
className
=
"self-center pr-2"
>
<
LabeledButton
classes
=
"py-1 bg-slate-1"
<
ButtonBase
classes
=
{
classnames
(
'px-1.5 py-1 bg-slate-1 text-grey-7 bg-grey-2'
,
'enabled:hover:text-grey-9 enabled:hover:bg-grey-3 disabled:text-grey-5'
,
'aria-pressed:bg-grey-3 aria-expanded:bg-grey-3'
)}
onClick
=
{
annotation
.
hidden
?
unhideAnnotation
:
hideAnnotation
}
title
=
{
annotation
.
hidden
?
'Make this annotation visible to everyone'
:
'Hide this annotationn from non-moderators'
}
variant
=
"dark"
>
{
annotation
.
hidden
?
'Unhide'
:
'Hide'
}
<
/
LabeledButton
>
<
/
ButtonBase
>
<
/div
>
<
/div
>
);
...
...
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