Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pounced-on.me
mastodon
Commits
34adc878
Unverified
Commit
34adc878
authored
5 years ago
by
Eugen Rochko
Committed by
GitHub
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix uncached media in web UI not being clickable (#11745)
parent
5466b39c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/javascript/mastodon/components/media_gallery.js
+2
-2
app/javascript/mastodon/components/media_gallery.js
app/javascript/styles/mastodon/components.scss
+4
-2
app/javascript/styles/mastodon/components.scss
with
6 additions
and
4 deletions
+6
-4
app/javascript/mastodon/components/media_gallery.js
+
2
-
2
View file @
34adc878
...
...
@@ -159,7 +159,7 @@ class Item extends React.PureComponent {
if
(
attachment
.
get
(
'
type
'
)
===
'
unknown
'
)
{
return
(
<
div
className
=
{
classNames
(
'
media-gallery__item
'
,
{
standalone
})}
key
=
{
attachment
.
get
(
'
id
'
)}
style
=
{{
left
:
left
,
top
:
top
,
right
:
right
,
bottom
:
bottom
,
width
:
`
${
width
}
%`
,
height
:
`
${
height
}
%`
}}
>
<
a
className
=
'
media-gallery__item-thumbnail
'
href
=
{
attachment
.
get
(
'
remote_url
'
)}
target
=
'
_blank
'
style
=
{{
cursor
:
'
pointer
'
}}
title
=
{
attachment
.
get
(
'
description
'
)}
>
<
a
className
=
'
media-gallery__item-thumbnail
'
href
=
{
attachment
.
get
(
'
remote_url
'
)
||
attachment
.
get
(
'
url
'
)
}
target
=
'
_blank
'
style
=
{{
cursor
:
'
pointer
'
}}
title
=
{
attachment
.
get
(
'
description
'
)}
>
<
canvas
width
=
{
32
}
height
=
{
32
}
ref
=
{
this
.
setCanvasRef
}
className
=
'
media-gallery__preview
'
/>
<
/a
>
<
/div
>
...
...
@@ -342,7 +342,7 @@ class MediaGallery extends React.PureComponent {
return
(
<
div
className
=
'
media-gallery
'
style
=
{
style
}
ref
=
{
this
.
handleRef
}
>
<
div
className
=
{
classNames
(
'
spoiler-button
'
,
{
'
spoiler-button--minified
'
:
visible
&&
!
uncached
})}
>
<
div
className
=
{
classNames
(
'
spoiler-button
'
,
{
'
spoiler-button--minified
'
:
visible
&&
!
uncached
,
'
spoiler-button--click-thru
'
:
uncached
})}
>
{
spoilerButton
}
<
/div
>
...
...
This diff is collapsed.
Click to expand it.
app/javascript/styles/mastodon/components.scss
+
4
-
2
View file @
34adc878
...
...
@@ -3449,6 +3449,10 @@ a.status-card.compact:hover {
height
:
auto
;
}
&
--click-thru
{
pointer-events
:
none
;
}
&
--hidden
{
display
:
none
;
}
...
...
@@ -3479,8 +3483,6 @@ a.status-card.compact:hover {
}
&
:disabled
{
cursor
:
not
-
allowed
;
.spoiler-button__overlay__label
{
background
:
rgba
(
$base-overlay-background
,
0
.5
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help