mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +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) {
|
||||
app.routes = {
|
||||
'index': { path: '/', component: IndexPage.component() },
|
||||
'index.filter': { path: '/:filter', component: IndexPage.component() },
|
||||
'index': {path: '/', component: IndexPage.component()},
|
||||
'index.filter': {path: '/:filter', component: IndexPage.component()},
|
||||
|
||||
'discussion.id': { path: '/d/:id', component: DiscussionPage.component() },
|
||||
'discussion': { path: '/d/:id/:slug', component: DiscussionPage.component() },
|
||||
'discussion.near': { path: '/d/:id/:slug/:near', component: DiscussionPage.component() },
|
||||
'discussion.id': {path: '/d/:id', component: DiscussionPage.component()},
|
||||
'discussion': {path: '/d/:id/:slug', component: DiscussionPage.component()},
|
||||
'discussion.near': {path: '/d/:id/:slug/:near', component: DiscussionPage.component()},
|
||||
|
||||
'user': { 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.posts': { path: '/u/:username/posts', component: ActivityPage.component({filter: 'posted'}) },
|
||||
'user': {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.posts': {path: '/u/:username/posts', component: ActivityPage.component({filter: 'posted'})},
|
||||
|
||||
'settings': { path: '/settings', component: SettingsPage.component() },
|
||||
'notifications': { path: '/notifications', component: NotificationsPage.component() }
|
||||
'settings': {path: '/settings', component: SettingsPage.component()},
|
||||
'notifications': {path: '/notifications', component: NotificationsPage.component()}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user