about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-08-20 19:46:41 +0200
committerThibaut Girka <thib@sitedethib.com>2019-08-20 20:38:42 +0200
commitf1528ea3c4b81dbc3f7bb8b5b5ae7734eeda989f (patch)
tree70f3571cd1d3b117df3363072740ea4423803165 /app/javascript/flavours/glitch/features/account_gallery/components/media_item.js
parent81d2d7109414d232d79446633fc9556ad0f1632b (diff)
[Glitch] Fix handling of audio files in account media gallery
Port b48c7ee059d0e08fff4bdf7fe7b0e09565288252 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/account_gallery/components/media_item.js')
-rw-r--r--app/javascript/flavours/glitch/features/account_gallery/components/media_item.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js b/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js
index 026136b2c..d60e06715 100644
--- a/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js
+++ b/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js
@@ -94,6 +94,12 @@ export default class MediaItem extends ImmutablePureComponent {
 
     if (attachment.get('type') === 'unknown') {
       // Skip
+    } else if (attachment.get('type') === 'audio') {
+      thumbnail = (
+        <span className='account-gallery__item__icons'>
+          <i className='fa fa-music' />
+        </span>
+      );
     } else if (attachment.get('type') === 'image') {
       const focusX = attachment.getIn(['meta', 'focus', 'x']) || 0;
       const focusY = attachment.getIn(['meta', 'focus', 'y']) || 0;