Card: ignore dimensions for links

merge-requests/507/head
Alex Gleason 2021-05-13 15:44:39 -05:00
rodzic b796d98925
commit 60f4385fe6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 1 dodań i 3 usunięć

Wyświetl plik

@ -161,11 +161,9 @@ export default class Card extends React.PureComponent {
return null;
}
const cardWidth = card.get('width', card.getIn(['pleroma', 'opengraph', 'width']));
const cardHeight = card.get('height', card.getIn(['pleroma', 'opengraph', 'height']));
const provider = card.get('provider_name').length === 0 ? decodeIDNA(getHostname(card.get('url'))) : card.get('provider_name');
const interactive = card.get('type') !== 'link';
const horizontal = (!compact && cardWidth > cardHeight && (cardWidth + 100 >= width)) || interactive || embedded;
const horizontal = interactive || embedded;
const className = classnames('status-card', { horizontal, compact, interactive }, `status-card--${card.get('type')}`);
const title = interactive ? <a className='status-card__title' href={card.get('url')} title={card.get('title')} rel='noopener' target='_blank'><strong>{card.get('title')}</strong></a> : <strong className='status-card__title' title={card.get('title')}>{card.get('title')}</strong>;
const ratio = this.getRatio(card);