-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex.js
37 lines (29 loc) · 833 Bytes
/
index.js
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
import Vue from 'vue'
import index from './index.vue'
import store from './store'
import install from './lib/util'
import detectLayer from './lib/layer'
import initateLayer from './store/_initateLayer'
import dummy from './dummy-encounter.json'
install(Vue)
const layer = window.layer = Vue.prototype.$layer = new (detectLayer())
const vm = window.rootvm = new Vue({
components: { index },
el: '#vue-root',
render: h => h(index),
store,
watch: {
['$store.state.settings.ui_scale']() {
this.$store.dispatch('settings/updateGlobalStyle')
}
},
mounted() {
this.$store.dispatch('settings/updateGlobalStyle')
this.$store.commit('settings/migrate')
initateLayer(layer)
}
})
if(process.env.NODE_ENV === 'development') {
window._dummy = () => layer.emit('data', dummy)
window._dummy()
}