mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 22:31:20 +00:00
Using community-link instead.
This commit is contained in:
parent
1b7a4ac090
commit
ea0881f87e
2 changed files with 13 additions and 12 deletions
|
@ -38,7 +38,6 @@ table! {
|
||||||
id -> Int4,
|
id -> Int4,
|
||||||
creator_id -> Nullable<Int4>,
|
creator_id -> Nullable<Int4>,
|
||||||
post_id -> Nullable<Int4>,
|
post_id -> Nullable<Int4>,
|
||||||
post_name -> Nullable<Varchar>,
|
|
||||||
parent_id -> Nullable<Int4>,
|
parent_id -> Nullable<Int4>,
|
||||||
content -> Nullable<Text>,
|
content -> Nullable<Text>,
|
||||||
removed -> Nullable<Bool>,
|
removed -> Nullable<Bool>,
|
||||||
|
@ -48,6 +47,7 @@ table! {
|
||||||
deleted -> Nullable<Bool>,
|
deleted -> Nullable<Bool>,
|
||||||
ap_id -> Nullable<Varchar>,
|
ap_id -> Nullable<Varchar>,
|
||||||
local -> Nullable<Bool>,
|
local -> Nullable<Bool>,
|
||||||
|
post_name -> Nullable<Varchar>,
|
||||||
community_id -> Nullable<Int4>,
|
community_id -> Nullable<Int4>,
|
||||||
community_actor_id -> Nullable<Varchar>,
|
community_actor_id -> Nullable<Varchar>,
|
||||||
community_local -> Nullable<Bool>,
|
community_local -> Nullable<Bool>,
|
||||||
|
|
23
ui/src/components/comment-node.tsx
vendored
23
ui/src/components/comment-node.tsx
vendored
|
@ -32,6 +32,7 @@ import { MomentTime } from './moment-time';
|
||||||
import { CommentForm } from './comment-form';
|
import { CommentForm } from './comment-form';
|
||||||
import { CommentNodes } from './comment-nodes';
|
import { CommentNodes } from './comment-nodes';
|
||||||
import { UserListing } from './user-listing';
|
import { UserListing } from './user-listing';
|
||||||
|
import { CommunityLink } from './community-link';
|
||||||
import { i18n } from '../i18next';
|
import { i18n } from '../i18next';
|
||||||
|
|
||||||
interface CommentNodeState {
|
interface CommentNodeState {
|
||||||
|
@ -186,8 +187,17 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
||||||
{this.props.showCommunity && (
|
{this.props.showCommunity && (
|
||||||
<>
|
<>
|
||||||
<span class="mx-1">{i18n.t('to')}</span>
|
<span class="mx-1">{i18n.t('to')}</span>
|
||||||
<Link class="mr-2" to={`/c/${node.comment.community_name}`}>
|
<CommunityLink
|
||||||
{node.comment.community_name}
|
community={{
|
||||||
|
name: node.comment.community_name,
|
||||||
|
id: node.comment.community_id,
|
||||||
|
local: node.comment.community_local,
|
||||||
|
actor_id: node.comment.community_actor_id,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<span class="mx-2">•</span>
|
||||||
|
<Link class="mr-2" to={`/post/${node.comment.post_id}`}>
|
||||||
|
{node.comment.post_name}
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@ -222,15 +232,6 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
||||||
<MomentTime data={node.comment} />
|
<MomentTime data={node.comment} />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{this.props.showCommunity && !this.state.collapsed && (
|
|
||||||
<>
|
|
||||||
<div class="md-div text-muted small">
|
|
||||||
<Link class="mr-2" to={`/post/${node.comment.post_id}`}>
|
|
||||||
{node.comment.post_name}
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{/* end of user row */}
|
{/* end of user row */}
|
||||||
{this.state.showEdit && (
|
{this.state.showEdit && (
|
||||||
<CommentForm
|
<CommentForm
|
||||||
|
|
Loading…
Reference in a new issue