From d8d2a5474148c38ddc5754fc5d7cbf8083bab3bf Mon Sep 17 00:00:00 2001 From: PFM Date: Wed, 6 Sep 2017 20:55:47 +0900 Subject: [PATCH] fix text position of NSFW for video file (#4819) --- .../mastodon/components/video_player.js | 4 ++-- app/javascript/styles/components.scss | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/components/video_player.js b/app/javascript/mastodon/components/video_player.js index 999cf42d9e..2c834fb665 100644 --- a/app/javascript/mastodon/components/video_player.js +++ b/app/javascript/mastodon/components/video_player.js @@ -146,7 +146,7 @@ export default class VideoPlayer extends React.PureComponent { if (!this.state.visible) { if (sensitive) { return ( -
+
{spoilerButton} @@ -154,7 +154,7 @@ export default class VideoPlayer extends React.PureComponent { ); } else { return ( -
+
{spoilerButton} diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index 1b9763e90a..bd7d0c3d48 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -2343,6 +2343,22 @@ button.icon-button.active i.fa-retweet { height: 100%; } +.media-spoiler__video { + align-items: center; + background: $base-overlay-background; + color: $primary-text-color; + cursor: pointer; + display: flex; + flex-direction: column; + border: 0; + width: 100%; + height: 100%; + justify-content: center; + position: relative; + text-align: center; + z-index: 100; +} + .media-spoiler__warning { display: block; font-size: 14px;