diff options
author | Reverite <github@reverite.sh> | 2019-08-25 11:16:18 -0700 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-08-25 11:16:18 -0700 |
commit | 54bf56d9e019e29c1509a2c5a0f23e4f1df65c90 (patch) | |
tree | 6744dc74316724501f36fdd2209b232024a164ac /app/javascript/flavours/glitch/features | |
parent | d2c357ba86b1a9d1b7b4c291e1c55811997027ed (diff) | |
parent | 284a1562fb195d7f6d41e76511d280b2dc74ea40 (diff) |
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/features')
-rw-r--r-- | app/javascript/flavours/glitch/features/account_gallery/components/media_item.js | 6 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/account_gallery/index.js | 2 |
2 files changed, 7 insertions, 1 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; diff --git a/app/javascript/flavours/glitch/features/account_gallery/index.js b/app/javascript/flavours/glitch/features/account_gallery/index.js index 3e4421306..66b938bea 100644 --- a/app/javascript/flavours/glitch/features/account_gallery/index.js +++ b/app/javascript/flavours/glitch/features/account_gallery/index.js @@ -111,7 +111,7 @@ export default class AccountGallery extends ImmutablePureComponent { } handleOpenMedia = attachment => { - if (attachment.get('type') === 'video') { + if (['video', 'audio'].includes(attachment.get('type'))) { this.props.dispatch(openModal('VIDEO', { media: attachment, status: attachment.get('status') })); } else { const media = attachment.getIn(['status', 'media_attachments']); |