mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +08:00
Rename user page components for consistency
This commit is contained in:
parent
69726844d7
commit
9a3e4ce4fe
|
@ -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()
|
|
@ -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>;
|
||||
})}
|
|
@ -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()}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.UserPostsPage-loadMore {
|
||||
.PostsUserPage-loadMore {
|
||||
text-align: center;
|
||||
|
||||
.LoadingIndicator {
|
||||
|
|
Loading…
Reference in New Issue
Block a user