forked from phillipsnj/mergCbusAdminServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstore.js
30 lines (28 loc) · 858 Bytes
/
store.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
import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex)
export default new Vuex.Store({
state: {
title: 'vue-test',
subTitle: 'Alpha',
nodes: [],
events: [],
cbusErrors:[],
dccErrors:[],
raw:{},
layout: {},
display_component: "node_list",
selected_node_id: 0,
debug : false,
colours :["black","red","pink","purple","deep-purple","indigo","blue","light-blue","cyan","teal","green","light-green","lime","yellow","amber","orange","deep-orange","brown","blue-grey","grey"]
},
mutations: {
selectNode (state, payload) {
state.selected_node = payload.node
state.display_item = payload.component
},
selectDisplay (state, payload){
state.display_item = payload.component
}
}
})