Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
mastodon
Commits
7a6464be
Commit
7a6464be
authored
5 years ago
by
Jeong Arm
Committed by
Eugen Rochko
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Bring back crossed eye icon on gallery (#10715)
parent
9679ec4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/javascript/mastodon/features/account_gallery/components/media_item.js
+11
-0
...astodon/features/account_gallery/components/media_item.js
app/javascript/styles/mastodon/components.scss
+8
-0
app/javascript/styles/mastodon/components.scss
with
19 additions
and
0 deletions
+19
-0
app/javascript/mastodon/features/account_gallery/components/media_item.js
+
11
-
0
View file @
7a6464be
...
...
@@ -2,6 +2,7 @@ import React from 'react';
import
PropTypes
from
'
prop-types
'
;
import
ImmutablePropTypes
from
'
react-immutable-proptypes
'
;
import
ImmutablePureComponent
from
'
react-immutable-pure-component
'
;
import
Icon
from
'
mastodon/components/icon
'
;
import
{
autoPlayGif
,
displayMedia
}
from
'
mastodon/initial_state
'
;
import
classNames
from
'
classnames
'
;
import
{
decode
}
from
'
blurhash
'
;
...
...
@@ -91,6 +92,7 @@ export default class MediaItem extends ImmutablePureComponent {
const
title
=
status
.
get
(
'
spoiler_text
'
)
||
attachment
.
get
(
'
description
'
);
let
thumbnail
=
''
;
let
icon
;
if
(
attachment
.
get
(
'
type
'
)
===
'
unknown
'
)
{
// Skip
...
...
@@ -132,11 +134,20 @@ export default class MediaItem extends ImmutablePureComponent {
);
}
if
(
!
visible
)
{
icon
=
(
<
span
className
=
'
account-gallery__item__icons
'
>
<
Icon
id
=
'
eye-slash
'
/>
<
/span
>
);
}
return
(
<
div
className
=
'
account-gallery__item
'
style
=
{{
width
,
height
}}
>
<
a
className
=
'
media-gallery__item-thumbnail
'
href
=
{
status
.
get
(
'
url
'
)}
target
=
'
_blank
'
onClick
=
{
this
.
handleClick
}
title
=
{
title
}
>
<
canvas
width
=
{
32
}
height
=
{
32
}
ref
=
{
this
.
setCanvasRef
}
className
=
{
classNames
(
'
media-gallery__preview
'
,
{
'
media-gallery__preview--hidden
'
:
visible
&&
loaded
})}
/
>
{
visible
&&
thumbnail
}
{
!
visible
&&
icon
}
<
/a
>
<
/div
>
);
...
...
This diff is collapsed.
Click to expand it.
app/javascript/styles/mastodon/components.scss
+
8
-
0
View file @
7a6464be
...
...
@@ -4829,6 +4829,14 @@ a.status-card.compact:hover {
border-radius
:
4px
;
overflow
:
hidden
;
margin
:
2px
;
&
__icons
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
font-size
:
24px
;
}
}
.notification__filter-bar
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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