]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Add media description as title to links of unknown media attachments
authorEugen Rochko <eugen@zeonfederated.com>
Fri, 21 Jun 2019 20:59:44 +0000 (22:59 +0200)
committerThibaut Girka <thib@sitedethib.com>
Mon, 24 Jun 2019 14:00:42 +0000 (16:00 +0200)
Port front-end changes from 49ebda4d49af50b375126e4a8285686fb6448a60 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
app/javascript/flavours/glitch/components/media_gallery.js
app/javascript/flavours/glitch/styles/components/composer.scss

index 6ef101f11583a0a0ea843bc8fc4b4fd81ac18542..291caff45347ea758e7003748f12afd46b7d03cf 100644 (file)
@@ -177,7 +177,7 @@ class Item extends React.PureComponent {
     if (attachment.get('type') === 'unknown') {
       return (
         <div className={classNames('media-gallery__item', { standalone })} key={attachment.get('id')} style={{ left: left, top: top, right: right, bottom: bottom, width: `${width}%`, height: `${height}%` }}>
-          <a className='media-gallery__item-thumbnail' href={attachment.get('remote_url')} target='_blank' style={{ cursor: 'pointer' }}>
+          <a className='media-gallery__item-thumbnail' href={attachment.get('remote_url')} target='_blank' style={{ cursor: 'pointer' }} title={attachment.get('description')}>
             <canvas width={32} height={32} ref={this.setCanvasRef} className='media-gallery__preview' />
           </a>
         </div>
index c06d79ffc2fdbec0ec81ec7d2793982d5c8db998..3eb5551c6ead1b03bd940f016526880774e3ed7f 100644 (file)
     border-radius: 4px;
     height: 140px;
     width: 100%;
+    background-color: $base-shadow-color;
     background-position: center;
     background-size: cover;
     background-repeat: no-repeat;