mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 15:13:42 +08:00
Clean up route definition code style
This commit is contained in:
parent
f3ef5a123c
commit
9c6b1c0b21
|
@ -11,20 +11,20 @@ import NotificationsPage from 'flarum/components/NotificationsPage';
|
||||||
*/
|
*/
|
||||||
export default function(app) {
|
export default function(app) {
|
||||||
app.routes = {
|
app.routes = {
|
||||||
'index': { path: '/', component: IndexPage.component() },
|
'index': {path: '/', component: IndexPage.component()},
|
||||||
'index.filter': { path: '/:filter', component: IndexPage.component() },
|
'index.filter': {path: '/:filter', component: IndexPage.component()},
|
||||||
|
|
||||||
'discussion.id': { path: '/d/:id', component: DiscussionPage.component() },
|
'discussion.id': {path: '/d/:id', component: DiscussionPage.component()},
|
||||||
'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: ActivityPage.component() },
|
'user': {path: '/u/:username', component: ActivityPage.component()},
|
||||||
'user.activity': { path: '/u/:username', component: ActivityPage.component() },
|
'user.activity': {path: '/u/:username', component: ActivityPage.component()},
|
||||||
'user.discussions': { path: '/u/:username/discussions', component: ActivityPage.component({filter: 'startedDiscussion'}) },
|
'user.discussions': {path: '/u/:username/discussions', component: ActivityPage.component({filter: 'startedDiscussion'})},
|
||||||
'user.posts': { path: '/u/:username/posts', component: ActivityPage.component({filter: 'posted'}) },
|
'user.posts': {path: '/u/:username/posts', component: ActivityPage.component({filter: 'posted'})},
|
||||||
|
|
||||||
'settings': { path: '/settings', component: SettingsPage.component() },
|
'settings': {path: '/settings', component: SettingsPage.component()},
|
||||||
'notifications': { path: '/notifications', component: NotificationsPage.component() }
|
'notifications': {path: '/notifications', component: NotificationsPage.component()}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user