Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
M
mastodon
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
Container Registry
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
comm.cx
mastodon
Commits
2172d832
Commit
2172d832
authored
Apr 13, 2019
by
ikuradon
🐈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add nsfw marker.
parent
933b4881
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
app/javascript/mastodon/components/media_gallery.js
app/javascript/mastodon/components/media_gallery.js
+6
-0
No files found.
app/javascript/mastodon/components/media_gallery.js
View file @
2172d832
...
...
@@ -245,6 +245,7 @@ class MediaGallery extends React.PureComponent {
const
width
=
this
.
state
.
width
||
defaultWidth
;
let
children
;
let
nsfw_eye
;
const
style
=
{};
...
...
@@ -287,8 +288,13 @@ class MediaGallery extends React.PureComponent {
}
}
if
(
sensitive
)
{
nsfw_eye
=
(
<
div
style
=
{{
position
:
'
absolute
'
,
bottom
:
0
,
left
:
0
,
zIndex
:
9999
}}
>
👀
<
/div>
)
;
}
return
(
<
div
className
=
'
media-gallery
'
style
=
{
style
}
ref
=
{
this
.
handleRef
}
>
{
nsfw_eye
}
<
div
className
=
{
classNames
(
'
spoiler-button
'
,
{
'
spoiler-button--visible
'
:
visible
})}
>
<
IconButton
title
=
{
intl
.
formatMessage
(
messages
.
toggle_visible
)}
icon
=
{
visible
?
'
eye
'
:
'
eye-slash
'
}
overlay
onClick
=
{
this
.
handleOpen
}
/
>
<
/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