Add visibility icon back in media gallery

master
Thibaut Girka 6 years ago
parent cbda1b8b66
commit b1ab4d5ebe
  1. 8
      app/javascript/flavours/glitch/features/account_gallery/components/media_item.js
  2. 8
      app/javascript/flavours/glitch/styles/components/accounts.scss

@ -131,11 +131,17 @@ export default class MediaItem extends ImmutablePureComponent {
); );
} }
const icon = (
<span className='account-gallery__item__icons'>
<i className='fa fa-eye-slash' />
</span>
);
return ( return (
<div className='account-gallery__item' style={{ width, height }}> <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}> <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 })} /> <canvas width={32} height={32} ref={this.setCanvasRef} className={classNames('media-gallery__preview', { 'media-gallery__preview--hidden': visible && loaded })} />
{visible && thumbnail} {visible ? thumbnail : icon}
</a> </a>
</div> </div>
); );

@ -343,6 +343,14 @@
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
margin: 2px; margin: 2px;
&__icons {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 24px;
}
} }
.notification__filter-bar, .notification__filter-bar,

Loading…
Cancel
Save