From b40dfc124b1fc72a675edff20e79301e92aa789f Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 6 May 2019 05:33:56 +0200 Subject: [PATCH] Add description on hover in media gallery (#10713) --- .../mastodon/features/account_gallery/components/media_item.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/account_gallery/components/media_item.js b/app/javascript/mastodon/features/account_gallery/components/media_item.js index 5643e6449..f44e20939 100644 --- a/app/javascript/mastodon/features/account_gallery/components/media_item.js +++ b/app/javascript/mastodon/features/account_gallery/components/media_item.js @@ -88,6 +88,7 @@ export default class MediaItem extends ImmutablePureComponent { const width = `${Math.floor((displayWidth - 4) / 3) - 4}px`; const height = width; const status = attachment.get('status'); + const title = status.get('spoiler_text') || attachment.get('description'); let thumbnail = ''; @@ -133,7 +134,7 @@ export default class MediaItem extends ImmutablePureComponent { return (
- + {visible && thumbnail}