forked from oaubert/x5gon-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
63 lines (53 loc) · 1.82 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/x5gon.css" />
</head>
<body>
<script src="./js/lib/vue.js"></script>
<script src="./js/lib/vuex.min.js"></script>
<script src="./js/lib/vue-router.min.js"></script>
<script src="./js/lib/httpVueLoader.min.js"></script>
<script src="./js/lib/d3.min.js"></script>
<script src="./js/lib/panzoom.min.js"></script>
<script src="./js/lib/vue-panzoom.min.js"></script>
<div id="x5gon-app">
<router-view class="view"></router-view>
<x5gon-notification></x5gon-notification>
<x5gon-loading-spinner></x5gon-loading-spinner>
</div>
</body>
<script type="module">
// TODO: refactor this code into App component
Vue.use(VueRouter);
Vue.use(Vuex);
import store from './js/Store.js';
import constant from './js/Constants.js';
Vue.prototype.$constant = constant;
if (document.location.toString().includes('relative_mapping')) {
constant.concept_mapping_from_reference = true;
}
import components from './js/Components.js';
const router = new VueRouter({
routes: [
{ path: '/', component: components.Home },
{ path: '/search', component: components.Search },
{ path: '/overview/:id?', component: components.Overview },
{ path: '/basket', component: components.Basket },
{ path: '/sequence', component: components.Sequence },
{ path: '/debug', component: components.Debug },
]
});
router.afterEach((to, from) => {
store.dispatch('hide_help');
});
var app = new Vue({
router: router,
store: store,
el: '#x5gon-app',
components: { 'x5gon-notification': components.Notification }
});
window.app = app;
</script>
</body>
</html>