Chats: display of non-image attachments

This commit is contained in:
Alex Gleason 2020-09-06 17:20:26 -05:00
parent a02155846d
commit 024e9209af
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 7 additions and 1 deletions

View file

@ -220,7 +220,7 @@ class Item extends React.PureComponent {
}
return (
<div className={classNames('media-gallery__item', { standalone })} key={attachment.get('id')} style={{ position, float, left, top, right, bottom, height, width: `${width}%` }}>
<div className={classNames('media-gallery__item', `media-gallery__item--${attachment.get('type')}`, { standalone })} key={attachment.get('id')} style={{ position, float, left, top, right, bottom, height, width: `${width}%` }}>
<canvas width={32} height={32} ref={this.setCanvasRef} className={classNames('media-gallery__preview', { 'media-gallery__preview--hidden': visible && this.state.loaded })} />
{visible && thumbnail}
</div>

View file

@ -351,6 +351,12 @@
display: none;
}
.media-gallery__item:not(.media-gallery__item--image) {
max-width: 100%;
width: 120px !important;
height: 70px !important;
}
&__preview {
background-color: transparent;
}