Rename user page components for consistency

This commit is contained in:
Toby Zerner 2015-08-05 11:48:35 +09:30
parent 69726844d7
commit 9a3e4ce4fe
4 changed files with 15 additions and 15 deletions

View File

@ -2,10 +2,10 @@ import UserPage from 'flarum/components/UserPage';
import DiscussionList from 'flarum/components/DiscussionList';
/**
* The `UserDiscussionsPage` component shows a user's activity feed inside of their
* profile.
* The `DiscussionsUserPage` component shows a discussion list inside of a user
* page.
*/
export default class UserDiscussionsPage extends UserPage {
export default class DiscussionsUserPage extends UserPage {
constructor(...args) {
super(...args);
@ -14,7 +14,7 @@ export default class UserDiscussionsPage extends UserPage {
content() {
return (
<div className="UserPostsPage">
<div className="DiscussionsUserPage">
{DiscussionList.component({
params: {
q: 'author:' + this.user.username()

View File

@ -4,10 +4,10 @@ import Button from 'flarum/components/Button';
import PostedActivity from 'flarum/components/PostedActivity';
/**
* The `UserPostsPage` component shows a user's activity feed inside of their
* The `PostsUserPage` component shows a user's activity feed inside of their
* profile.
*/
export default class UserPostsPage extends UserPage {
export default class PostsUserPage extends UserPage {
constructor(...args) {
super(...args);
@ -49,7 +49,7 @@ export default class UserPostsPage extends UserPage {
footer = LoadingIndicator.component();
} else if (this.moreResults) {
footer = (
<div className="UserPostsPage-loadMore">
<div className="PostsUserPage-loadMore">
{Button.component({
children: app.trans('core.load_more'),
className: 'Button',
@ -60,8 +60,8 @@ export default class UserPostsPage extends UserPage {
}
return (
<div className="UserPostsPage">
<ul className="UserPostsPage-list ActivityList">
<div className="PostsUserPage">
<ul className="PostsUserPage-list ActivityList">
{this.posts.map(post => {
return <li>{PostedActivity.component({post})}</li>;
})}

View File

@ -1,7 +1,7 @@
import IndexPage from 'flarum/components/IndexPage';
import DiscussionPage from 'flarum/components/DiscussionPage';
import UserPostsPage from 'flarum/components/UserPostsPage';
import UserDiscussionsPage from 'flarum/components/UserDiscussionsPage';
import PostsUserPage from 'flarum/components/PostsUserPage';
import DiscussionsUserPage from 'flarum/components/DiscussionsUserPage';
import SettingsPage from 'flarum/components/SettingsPage';
import NotificationsPage from 'flarum/components/NotificationsPage';
@ -19,9 +19,9 @@ export default function(app) {
'discussion': {path: '/d/:id/:slug', component: DiscussionPage.component()},
'discussion.near': {path: '/d/:id/:slug/:near', component: DiscussionPage.component()},
'user': {path: '/u/:username', component: UserPostsPage.component()},
'user.posts': {path: '/u/:username', component: UserPostsPage.component()},
'user.discussions': {path: '/u/:username/discussions', component: UserDiscussionsPage.component()},
'user': {path: '/u/:username', component: PostsUserPage.component()},
'user.posts': {path: '/u/:username', component: PostsUserPage.component()},
'user.discussions': {path: '/u/:username/discussions', component: DiscussionsUserPage.component()},
'settings': {path: '/settings', component: SettingsPage.component()},
'notifications': {path: '/notifications', component: NotificationsPage.component()}

View File

@ -1,4 +1,4 @@
.UserPostsPage-loadMore {
.PostsUserPage-loadMore {
text-align: center;
.LoadingIndicator {