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

View File

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

View File

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

View File

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