mirror of
https://github.com/flarum/core.git
synced 2025-08-07 08:56:38 +02:00
update: forum/components/PostsUserPage
This commit is contained in:
committed by
Franz Liedke
parent
c899e11070
commit
6e88dfb2cb
@@ -9,8 +9,8 @@ import CommentPost from './CommentPost';
|
||||
* profile.
|
||||
*/
|
||||
export default class PostsUserPage extends UserPage {
|
||||
init() {
|
||||
super.init();
|
||||
oninit(vnode) {
|
||||
super.oninit(vnode);
|
||||
|
||||
/**
|
||||
* Whether or not the activity feed is currently loading.
|
||||
@@ -55,15 +55,13 @@ export default class PostsUserPage extends UserPage {
|
||||
let footer;
|
||||
|
||||
if (this.loading) {
|
||||
footer = LoadingIndicator.component();
|
||||
footer = <LoadingIndicator />;
|
||||
} else if (this.moreResults) {
|
||||
footer = (
|
||||
<div className="PostsUserPage-loadMore">
|
||||
{Button.component({
|
||||
children: app.translator.trans('core.forum.user.posts_load_more_button'),
|
||||
className: 'Button',
|
||||
onclick: this.loadMore.bind(this),
|
||||
})}
|
||||
<Button className="Button" onclick={this.loadMore.bind(this)}>
|
||||
{app.translator.trans('core.forum.user.posts_load_more_button')}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -75,14 +73,11 @@ export default class PostsUserPage extends UserPage {
|
||||
<li>
|
||||
<div className="PostsUserPage-discussion">
|
||||
{app.translator.trans('core.forum.user.in_discussion_text', {
|
||||
discussion: (
|
||||
<a href={app.route.post(post)} config={m.route}>
|
||||
{post.discussion().title()}
|
||||
</a>
|
||||
),
|
||||
discussion: <a route={app.route.post(post)}>{post.discussion().title()}</a>,
|
||||
})}
|
||||
</div>
|
||||
{CommentPost.component({ post })}
|
||||
|
||||
<CommentPost post={post} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
@@ -110,7 +105,7 @@ export default class PostsUserPage extends UserPage {
|
||||
this.loading = true;
|
||||
this.posts = [];
|
||||
|
||||
m.lazyRedraw();
|
||||
m.redraw();
|
||||
|
||||
this.loadResults().then(this.parseResults.bind(this));
|
||||
}
|
||||
|
Reference in New Issue
Block a user