mirror of
https://github.com/flarum/framework.git
synced 2024-12-03 15:43:59 +08:00
Make user posts page similar to discussion page, add empty text
This commit is contained in:
parent
def0023382
commit
49d9571b8a
|
@ -1,6 +1,7 @@
|
||||||
import UserPage from './UserPage';
|
import UserPage from './UserPage';
|
||||||
import LoadingIndicator from '../../common/components/LoadingIndicator';
|
import LoadingIndicator from '../../common/components/LoadingIndicator';
|
||||||
import Button from '../../common/components/Button';
|
import Button from '../../common/components/Button';
|
||||||
|
import Placeholder from '../../common/components/Placeholder';
|
||||||
import CommentPost from './CommentPost';
|
import CommentPost from './CommentPost';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,6 +60,15 @@ export default class PostsUserPage extends UserPage {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.posts.length === 0 && !this.loading) {
|
||||||
|
const text = app.translator.trans('core.forum.user.posts_empty_text');
|
||||||
|
return (
|
||||||
|
<div className="PostsUserPage">
|
||||||
|
{Placeholder.component({text})}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="PostsUserPage">
|
<div className="PostsUserPage">
|
||||||
<ul className="PostsUserPage-list">
|
<ul className="PostsUserPage-list">
|
||||||
|
@ -71,7 +81,9 @@ export default class PostsUserPage extends UserPage {
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
{footer}
|
<div className="PostsUserPage-loadMore">
|
||||||
|
{footer}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
.PostsUserPage-loadMore {
|
.PostsUserPage-loadMore {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
.LoadingIndicator {
|
.LoadingIndicator {
|
||||||
height: 46px;
|
height: 46px;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user