forked from OkunaOrg/okuna-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrouter.js
More file actions
85 lines (83 loc) 路 2.93 KB
/
Copy pathrouter.js
File metadata and controls
85 lines (83 loc) 路 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import Vue from 'vue';
import Router from 'vue-router';
import OkHomePage from "./pages/home/OkHomePage";
import OkMenuPage from "./pages/home/pages/menu/OkMenuPage";
import OkNotificationsPage from "./pages/home/pages/notifications/OkNotificationsPage";
import OkNowPage from "./pages/home/pages/now/OkNowPage";
import OkTimelinePage from "./pages/home/pages/timeline/OkTimelinePage";
import OkHashtagPage from "./pages/home/pages/hashtag/OkHashtagPage";
import OkPostPage from "./pages/home/pages/post/OkPostPage";
import OkUserPage from "./pages/home/pages/user/OkUserProfilePage";
import OkCommunitiesPage from "./pages/home/pages/communities/OkCommunitiesPage";
import OkAuthPage from "./pages/auth/OkAuthPage";
import OkLoginPage from "./pages/auth/pages/OkLoginPage";
import OkRegisterPage from "./pages/auth/pages/register-page/OkRegisterPage";
import OkCommunityProfile from "./pages/home/pages/community/OkCommunityProfile";
Vue.use(Router);
export function createRouter() {
return new Router({
mode: 'history',
routes: [
{
path: '/',
name: 'home',
component: OkHomePage,
children: [
{
name: 'timeline',
path: '',
component: OkTimelinePage
},
{
path: 'm',
component: OkMenuPage
},
{
path: 'n',
component: OkNotificationsPage
},
{
name: 'communities',
path: 'c',
component: OkCommunitiesPage,
},
{
path: 'c/:communityName',
component: OkCommunityProfile,
},
{
path: 'now',
component: OkNowPage
},
{
path: 'h/:hashtagName',
component: OkHashtagPage,
},
{
name: 'post',
path: 'p/:postUuid',
component: OkPostPage,
},
{
path: ':userUsername',
component: OkUserPage,
},
]
},
{
path: '/a',
component: OkAuthPage,
children: [
{
path: 'login',
component: OkLoginPage
},
{
path: 'register',
component: OkRegisterPage
}
]
},
]
})
}