]> cat aescling's git repositories - mastodon.git/commitdiff
Add visibility icon back in media gallery
authorThibaut Girka <thib@sitedethib.com>
Sat, 4 May 2019 18:06:17 +0000 (20:06 +0200)
committerThibaut Girka <thib@sitedethib.com>
Sat, 4 May 2019 18:06:17 +0000 (20:06 +0200)
app/javascript/flavours/glitch/features/account_gallery/components/media_item.js
app/javascript/flavours/glitch/styles/components/accounts.scss

index f2a661862f104d6a68585ebf2369757d399eb598..026136b2c2ccc618c1a19d44e87a24f65de167e4 100644 (file)
@@ -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 (
       <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}>
           <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>
       </div>
     );
index 518eea5fa2b3ea2fe1528678e3ea98fcfb1aeb8c..c0340e3f83d672523e8cdf6f3f12b34f807a0979 100644 (file)
   border-radius: 4px;
   overflow: hidden;
   margin: 2px;
+
+  &__icons {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    font-size: 24px;
+  }
 }
 
 .notification__filter-bar,