Only letterbox media without an aspect ratio
This commit is contained in:
parent
4cc400e336
commit
5b24ac0503
2 changed files with 5 additions and 4 deletions
|
@ -157,13 +157,14 @@ class Item extends React.PureComponent {
|
|||
</div>
|
||||
);
|
||||
} else if (attachment.get('type') === 'image') {
|
||||
const previewUrl = attachment.get('preview_url');
|
||||
const previewUrl = attachment.get('preview_url');
|
||||
|
||||
const originalUrl = attachment.get('url');
|
||||
const originalUrl = attachment.get('url');
|
||||
const letterboxed = !attachment.getIn(['meta', 'original', 'aspect']);
|
||||
|
||||
thumbnail = (
|
||||
<a
|
||||
className='media-gallery__item-thumbnail'
|
||||
className={classNames('media-gallery__item-thumbnail', { letterboxed })}
|
||||
href={attachment.get('remote_url') || originalUrl}
|
||||
onClick={this.handleClick}
|
||||
target='_blank'
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
.status__wrapper,
|
||||
.detailed-status__wrapper {
|
||||
.media-gallery__item-thumbnail {
|
||||
.media-gallery__item-thumbnail.letterboxed {
|
||||
&,
|
||||
.still-image {
|
||||
img {
|
||||
|
|
Loading…
Reference in a new issue