mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-05 12:05:01 +00:00
cross-posting almost done.
This commit is contained in:
parent
9b558611b4
commit
9b8d8d3246
2 changed files with 15 additions and 0 deletions
|
@ -150,6 +150,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
<li className="list-inline-item mr-2">
|
<li className="list-inline-item mr-2">
|
||||||
<span class="pointer" onClick={linkEvent(this, this.handleSavePostClick)}>{post.saved ? i18n.t('unsave') : i18n.t('save')}</span>
|
<span class="pointer" onClick={linkEvent(this, this.handleSavePostClick)}>{post.saved ? i18n.t('unsave') : i18n.t('save')}</span>
|
||||||
</li>
|
</li>
|
||||||
|
<li className="list-inline-item mr-2">
|
||||||
|
<span class="pointer" onClick={linkEvent(this, this.handleCrossPostClick)}><T i18nKey="cross_post">#</T></span>
|
||||||
|
</li>
|
||||||
{this.myPost &&
|
{this.myPost &&
|
||||||
<>
|
<>
|
||||||
<li className="list-inline-item">
|
<li className="list-inline-item">
|
||||||
|
@ -270,6 +273,17 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
WebSocketService.Instance.savePost(form);
|
WebSocketService.Instance.savePost(form);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleCrossPostClick(i: PostListing) {
|
||||||
|
let params = `?name=${i.props.post.name}`;
|
||||||
|
if (i.props.post.url) {
|
||||||
|
params += `&url=${i.props.post.url}`;
|
||||||
|
}
|
||||||
|
if (i.props.post.body) {
|
||||||
|
params += `&body=${i.props.post.body}`;
|
||||||
|
}
|
||||||
|
i.context.router.history.push(`/create_post${params}`);
|
||||||
|
}
|
||||||
|
|
||||||
handleModRemoveShow(i: PostListing) {
|
handleModRemoveShow(i: PostListing) {
|
||||||
i.state.showRemoveDialog = true;
|
i.state.showRemoveDialog = true;
|
||||||
i.setState(i.state);
|
i.setState(i.state);
|
||||||
|
|
|
@ -9,6 +9,7 @@ export const en = {
|
||||||
posts: 'Posts',
|
posts: 'Posts',
|
||||||
related_posts: 'These posts might be related',
|
related_posts: 'These posts might be related',
|
||||||
cross_posts: 'This link has also been posted to:',
|
cross_posts: 'This link has also been posted to:',
|
||||||
|
cross_post: 'cross-post',
|
||||||
comments: 'Comments',
|
comments: 'Comments',
|
||||||
number_of_comments:'{{count}} Comments',
|
number_of_comments:'{{count}} Comments',
|
||||||
remove_comment: 'Remove Comment',
|
remove_comment: 'Remove Comment',
|
||||||
|
|
Loading…
Reference in a new issue