import app from '../../forum/app';
import UserPage from './UserPage';
import LoadingIndicator from '../../common/components/LoadingIndicator';
import Button from '../../common/components/Button';
import Link from '../../common/components/Link';
import Placeholder from '../../common/components/Placeholder';
import CommentPost from './CommentPost';
/**
* The `PostsUserPage` component shows a user's activity feed inside of their
* profile.
*/
export default class PostsUserPage extends UserPage {
oninit(vnode) {
super.oninit(vnode);
/**
* Whether or not the activity feed is currently loading.
*
* @type {Boolean}
*/
this.loading = true;
/**
* Whether or not there are any more activity items that can be loaded.
*
* @type {Boolean}
*/
this.moreResults = false;
/**
* The Post models in the feed.
*
* @type {Post[]}
*/
this.posts = [];
/**
* The number of activity items to load per request.
*
* @type {number}
*/
this.loadLimit = 20;
this.loadUser(m.route.param('username'));
}
content() {
if (this.posts.length === 0 && !this.loading) {
return (
);
}
let footer;
if (this.loading) {
footer = ;
} else if (this.moreResults) {
footer = (