Mercurial > gemma
comparison client/src/router.js @ 713:badbc0207418
feat: systeminformation feature added
Under systeminformation there is a component to display textual
data. Currently there is a stub log from my console displayed.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 21 Sep 2018 13:18:30 +0200 |
parents | 8e67604d972a |
children | fb39ec3b95a8 |
comparison
equal
deleted
inserted
replaced
712:86725b39b2d2 | 713:badbc0207418 |
---|---|
8 | 8 |
9 /* facilitate codesplitting */ | 9 /* facilitate codesplitting */ |
10 const Login = () => import("./login/Login.vue"); | 10 const Login = () => import("./login/Login.vue"); |
11 const Main = () => import("./application/Main.vue"); | 11 const Main = () => import("./application/Main.vue"); |
12 const Usermanagement = () => import("./usermanagement/Usermanagement.vue"); | 12 const Usermanagement = () => import("./usermanagement/Usermanagement.vue"); |
13 const Logs = () => import("./logs/logs.vue"); | |
13 | 14 |
14 Vue.use(Router); | 15 Vue.use(Router); |
15 | 16 |
16 const router = new Router({ | 17 const router = new Router({ |
17 routes: [ | 18 routes: [ |
22 }, | 23 }, |
23 { | 24 { |
24 path: "/usermanagement", | 25 path: "/usermanagement", |
25 name: "usermanagement", | 26 name: "usermanagement", |
26 component: Usermanagement, | 27 component: Usermanagement, |
28 meta: { | |
29 requiresAuth: true | |
30 }, | |
31 beforeEnter: (to, from, next) => { | |
32 const isSysadmin = store.getters["user/isSysAdmin"]; | |
33 if (!isSysadmin) { | |
34 next("/"); | |
35 } else { | |
36 next(); | |
37 } | |
38 } | |
39 }, | |
40 { | |
41 path: "/logs", | |
42 name: "logs", | |
43 component: Logs, | |
27 meta: { | 44 meta: { |
28 requiresAuth: true | 45 requiresAuth: true |
29 }, | 46 }, |
30 beforeEnter: (to, from, next) => { | 47 beforeEnter: (to, from, next) => { |
31 const isSysadmin = store.getters["user/isSysAdmin"]; | 48 const isSysadmin = store.getters["user/isSysAdmin"]; |