From: SleeplessOne1917 Date: Mon, 19 Jun 2023 23:32:00 +0000 (+0000) Subject: Merge branch 'main' into fix/add-aria-label-to-featured-pins X-Git-Url: http://these/git/%7Bthis.favIcon%7D?a=commitdiff_plain;h=13df4b9c56e5d27a4b57c69560401b1da9683e0d;p=lemmy-ui.git Merge branch 'main' into fix/add-aria-label-to-featured-pins --- 13df4b9c56e5d27a4b57c69560401b1da9683e0d diff --cc src/shared/components/post/post-listing.tsx index 222e485,5ee0761..8e69b18 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@@ -518,84 -486,105 +486,107 @@@ export class PostListing extends Compon const url = post.url; return ( -
-
- {url && this.props.showBody ? ( - - ) : ( - this.postLink + <> +
+
+ {url && this.props.showBody ? ( + + ) : ( + this.postLink + )} +
+ {(url && isImage(url)) || + (post.thumbnail_url && ( + + ))} + {post.removed && ( + + {i18n.t("removed")} + )} -
- {(url && isImage(url)) || - (post.thumbnail_url && ( - - ))} - {post.removed && ( - - {i18n.t("removed")} - - )} - {post.deleted && ( - - - - )} - {post.locked && ( - - - - )} - {post.featured_community && ( - - - - )} - {post.featured_local && ( - + + )} + {post.locked && ( + + + + )} + {post.featured_community && ( + + + + )} + {post.featured_local && ( + + + + )} + {post.nsfw && ( + + {i18n.t("nsfw")} + + )} +
+ {url && this.urlLine()} + + ); + } + + urlLine() { + const post = this.postView.post; + const url = post.url; + + return ( +

+ {url && !(hostname(url) === getExternalHost()) && ( + - - - )} - {post.nsfw && ( - - {i18n.t("nsfw")} - + {hostname(url)} + )} - +

); }