Merge branch 'conditional-letterbox' into 'develop'

Only letterbox media without an aspect ratio

See merge request soapbox-pub/soapbox-fe!502
This commit is contained in:
Alex Gleason 2021-05-13 01:24:07 +00:00
commit 303578c710
2 changed files with 5 additions and 4 deletions

View File

@ -160,10 +160,11 @@ class Item extends React.PureComponent {
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 = ( thumbnail = (
<a <a
className='media-gallery__item-thumbnail' className={classNames('media-gallery__item-thumbnail', { letterboxed })}
href={attachment.get('remote_url') || originalUrl} href={attachment.get('remote_url') || originalUrl}
onClick={this.handleClick} onClick={this.handleClick}
target='_blank' target='_blank'

View File

@ -66,7 +66,7 @@
.status__wrapper, .status__wrapper,
.detailed-status__wrapper { .detailed-status__wrapper {
.media-gallery__item-thumbnail { .media-gallery__item-thumbnail.letterboxed {
&, &,
.still-image { .still-image {
img { img {