From: Dessalines Date: Mon, 14 Feb 2022 18:49:57 +0000 (-0500) Subject: Add federated post and comment links. Fixes #569 (#575) X-Git-Url: http://these/git/readmes/%7BpictrsAvatarThumbnail%28this.props.site.site.icon%29%7D?a=commitdiff_plain;h=e13ab2ee468924eb42d3a858f093e23b31d9cf8f;p=lemmy-ui.git Add federated post and comment links. Fixes #569 (#575) --- diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index 1af8e11..d9702ba 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -1,3 +1,4 @@ +import classNames from "classnames"; import { Component, linkEvent } from "inferno"; import { Link } from "inferno-router"; import { @@ -849,14 +850,30 @@ export class CommentNode extends Component { linkBtn(small = false) { let cv = this.props.node.comment_view; + let classnames = classNames("btn btn-link btn-animate text-muted", { + "btn-sm": small, + }); + + let title = this.props.showContext + ? i18n.t("show_context") + : i18n.t("link"); + return ( - - - + <> + + + + {/* TODO comment ap_ids are currently broken anyway, so use post.ap_id, and wait until comment tree / endpoint refactor */} + {!cv.comment.local && ( + + + + )} + ); } diff --git a/src/shared/components/common/symbols.tsx b/src/shared/components/common/symbols.tsx index d730c15..03791d1 100644 --- a/src/shared/components/common/symbols.tsx +++ b/src/shared/components/common/symbols.tsx @@ -12,6 +12,71 @@ export const SYMBOLS = ( xmlnsXlink="http://www.w3.org/1999/xlink" > + + + + + + + + + + + + + + + + + + + + + diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 1608d41..9b07d1c 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -445,6 +445,11 @@ export class PostListing extends Component { /> )} + {!post.local && ( + + + + )} {post.removed && ( {i18n.t("removed")}