mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-23 03:11:25 +00:00
fixing federated community / cross-post display links. Fixes #75
This commit is contained in:
parent
fb45345bb2
commit
c98a108ee3
2 changed files with 26 additions and 7 deletions
|
@ -617,7 +617,13 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
</li>
|
</li>
|
||||||
{this.props.post.duplicates.map(post => (
|
{this.props.post.duplicates.map(post => (
|
||||||
<li className="list-inline-item mr-2">
|
<li className="list-inline-item mr-2">
|
||||||
<Link to={`/post/${post.id}`}>{post.community_name}</Link>
|
<Link to={`/post/${post.id}`}>
|
||||||
|
{post.community_local
|
||||||
|
? post.community_name
|
||||||
|
: `${post.community_name}@${hostname(
|
||||||
|
post.community_actor_id
|
||||||
|
)}`}
|
||||||
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -55,6 +55,7 @@ import { UserDetails } from './user-details';
|
||||||
import { MarkdownTextArea } from './markdown-textarea';
|
import { MarkdownTextArea } from './markdown-textarea';
|
||||||
import { ImageUploadForm } from './image-upload-form';
|
import { ImageUploadForm } from './image-upload-form';
|
||||||
import { BannerIconHeader } from './banner-icon-header';
|
import { BannerIconHeader } from './banner-icon-header';
|
||||||
|
import { CommunityLink } from './community-link';
|
||||||
|
|
||||||
interface UserState {
|
interface UserState {
|
||||||
userRes: UserDetailsResponse;
|
userRes: UserDetailsResponse;
|
||||||
|
@ -841,9 +842,15 @@ export class User extends Component<any, UserState> {
|
||||||
<ul class="list-unstyled mb-0">
|
<ul class="list-unstyled mb-0">
|
||||||
{this.state.userRes.moderates.map(community => (
|
{this.state.userRes.moderates.map(community => (
|
||||||
<li>
|
<li>
|
||||||
<Link to={`/c/${community.community_name}`}>
|
<CommunityLink
|
||||||
{community.community_name}
|
community={{
|
||||||
</Link>
|
name: community.community_name,
|
||||||
|
id: community.community_id,
|
||||||
|
local: community.community_local,
|
||||||
|
actor_id: community.community_actor_id,
|
||||||
|
icon: community.community_icon,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -864,9 +871,15 @@ export class User extends Component<any, UserState> {
|
||||||
<ul class="list-unstyled mb-0">
|
<ul class="list-unstyled mb-0">
|
||||||
{this.state.userRes.follows.map(community => (
|
{this.state.userRes.follows.map(community => (
|
||||||
<li>
|
<li>
|
||||||
<Link to={`/c/${community.community_name}`}>
|
<CommunityLink
|
||||||
{community.community_name}
|
community={{
|
||||||
</Link>
|
name: community.community_name,
|
||||||
|
id: community.community_id,
|
||||||
|
local: community.community_local,
|
||||||
|
actor_id: community.community_actor_id,
|
||||||
|
icon: community.community_icon,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in a new issue