File tree Expand file tree Collapse file tree
mastodon/features/account_gallery/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
22import PropTypes from 'prop-types' ;
33import ImmutablePropTypes from 'react-immutable-proptypes' ;
44import ImmutablePureComponent from 'react-immutable-pure-component' ;
5+ import Icon from 'mastodon/components/icon' ;
56import { autoPlayGif , displayMedia } from 'mastodon/initial_state' ;
67import classNames from 'classnames' ;
78import { decode } from 'blurhash' ;
@@ -91,6 +92,7 @@ export default class MediaItem extends ImmutablePureComponent {
9192 const title = status . get ( 'spoiler_text' ) || attachment . get ( 'description' ) ;
9293
9394 let thumbnail = '' ;
95+ let icon ;
9496
9597 if ( attachment . get ( 'type' ) === 'unknown' ) {
9698 // Skip
@@ -132,11 +134,20 @@ export default class MediaItem extends ImmutablePureComponent {
132134 ) ;
133135 }
134136
137+ if ( ! visible ) {
138+ icon = (
139+ < span className = 'account-gallery__item__icons' >
140+ < Icon id = 'eye-slash' />
141+ </ span >
142+ ) ;
143+ }
144+
135145 return (
136146 < div className = 'account-gallery__item' style = { { width, height } } >
137147 < a className = 'media-gallery__item-thumbnail' href = { status . get ( 'url' ) } target = '_blank' onClick = { this . handleClick } title = { title } >
138148 < canvas width = { 32 } height = { 32 } ref = { this . setCanvasRef } className = { classNames ( 'media-gallery__preview' , { 'media-gallery__preview--hidden' : visible && loaded } ) } />
139149 { visible && thumbnail }
150+ { ! visible && icon }
140151 </ a >
141152 </ div >
142153 ) ;
Original file line number Diff line number Diff line change @@ -4829,6 +4829,14 @@ a.status-card.compact:hover {
48294829 border-radius : 4px ;
48304830 overflow : hidden ;
48314831 margin : 2px ;
4832+
4833+ & __icons {
4834+ position : absolute ;
4835+ top : 50% ;
4836+ left : 50% ;
4837+ transform : translate (-50% , -50% );
4838+ font-size : 24px ;
4839+ }
48324840}
48334841
48344842.notification__filter-bar ,
You can’t perform that action at this time.
0 commit comments