From bc8ad12b04a501bf670cc541b20282a791a3aac4 Mon Sep 17 00:00:00 2001 From: Andre Vallestero Date: Thu, 7 May 2020 21:26:08 -0400 Subject: Added externally hosted UI thumbnail support --- ui/src/components/post-listing.tsx | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'ui') diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index d0efa043..36a1e282 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -150,9 +150,9 @@ export class PostListing extends Component { let post = this.props.post; return ( ); @@ -163,6 +163,8 @@ export class PostListing extends Component { if (isImage(post.url)) { if (post.url.includes('pictshare')) { return pictshareImage(post.url, thumbnail); + } else if (post.thumbnail_url) { + return pictshareImage(post.thumbnail_url, thumbnail); } else { return post.url; } @@ -542,8 +544,9 @@ export class PostListing extends Component { } > @@ -586,8 +589,9 @@ export class PostListing extends Component { } > @@ -618,8 +622,9 @@ export class PostListing extends Component { data-tippy-content={i18n.t('view_source')} > @@ -639,8 +644,9 @@ export class PostListing extends Component { } > @@ -657,8 +663,9 @@ export class PostListing extends Component { } > -- cgit v1.2.3