-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrouter.js
More file actions
144 lines (137 loc) · 4.13 KB
/
router.js
File metadata and controls
144 lines (137 loc) · 4.13 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/*=========================================================================================
File Name: router.js
Description: Routes for vue-router. Lazy loading is enabled.
----------------------------------------------------------------------------------------
Item Name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template
Author: Pixinvent
Author URL: http://www.themeforest.net/user/pixinvent
==========================================================================================*/
import Vue from "vue";
import Router from "vue-router";
import AuthRequired from "./utils/AuthRequired.js";
Vue.use(Router);
const router = new Router({
mode: "history",
base: process.env.BASE_URL,
scrollBehavior() {
return { x: 0, y: 0 };
},
routes: [
{
// =============================================================================
// MAIN LAYOUT ROUTES
// =============================================================================
path: "/",
component: () => import("./layouts/main/Main.vue"),
beforeEnter: AuthRequired,
children: [
// =============================================================================
// Theme Routes
// =============================================================================
{
path: "/",
name: "home",
component: () => import("./views/Home.vue")
},
{
path: "/users",
name: "users",
component: () => import("./views/users/UserList.vue")
},
{
path: "/transactions/:txtype",
name: "transactionsList",
component: () => import("./views/Transactions.vue")
},
{
path: "/tools/txchecktool",
name: "tools",
component: () => import("./views/tools/TransactionCheck.vue")
},
{
path: "/matchevents/:widgetid",
name: "transactionsList",
component: () => import("./views/MatchEvents.vue")
},
{
path: "/matchresults/:gameid",
name: "transactionsList",
component: () => import("./views/MatchResults.vue")
},
{
path: "/transactions",
name: "transactions",
redirect: "/transactions/deposits"
},
{
path: "/userbetsv2",
name: "userbetsv2",
component: () => import("./views/UserBetsv2.vue")
},
{
path: "/userbetsallv2",
name: "userbetsallv2",
component: () => import("./views/AllUserBetsv2.vue")
},
{
path: "/listevents",
name: "listevents",
component: () => import("./views/GameEvents.vue")
},
{
path: "/userbets",
name: "userbets",
component: () => import("./views/UserBets.vue")
},
{
path: "/userbetsall",
name: "userbetsall",
component: () => import("./views/AllUserBets.vue")
},
{
path: "/casinotxs",
name: "casinotxs",
component: () => import("./views/AllCasinoTransactions.vue")
},
{
path: "/sports",
name: "sports",
component: () => import("./views/Sports.vue")
},
{
path: "/settings/news",
name: "news",
component: () => import("./views/settings/News.vue")
},
{
path: "/services",
name: "services",
component: () => import("./views/Services.vue")
},
{
path: "/user-edit/:userId",
name: "user-edit",
component: () => import("./views/usersettings/UserSettings.vue")
}
]
},
{
path: "/login",
name: "login",
component: () => import("@/views/pages/Login.vue")
},
// Redirect to 404 page, if no match found
{
path: "*",
redirect: "/pages/error-404"
}
]
});
router.afterEach(() => {
// Remove initial loading
const appLoading = document.getElementById("loading-bg");
if (appLoading) {
appLoading.style.display = "none";
}
});
export default router;