added the menu controller

This commit is contained in:
Torben Indorf
2020-02-17 07:11:21 +01:00
parent 6fe11728eb
commit 39bbf9a3d7
9 changed files with 169 additions and 133 deletions
+5
View File
@@ -2,6 +2,7 @@ import { ActionTree, Module } from 'vuex';
const store = {
selectedArea: undefined,
headerTitle: undefined
};
const actions: ActionTree<any, any> = {
@@ -10,11 +11,15 @@ const actions: ActionTree<any, any> = {
const mutations = {
saveArea: (state: any, area: any) => {
state.selectedArea = area;
},
saveHeaderTitle: (state: any, title: string) => {
state.headerTitle = title;
}
};
const getters = {
selectedArea: (state: any) => state.selectedArea,
headerTitle: (state: any) => state.headerTitle
};
const globalStore: Module<any, any> = {
-2
View File
@@ -26,8 +26,6 @@ const actions: ActionTree<any, any> = {
Promise<any> => {
const response = await statusRepository.getIcons(lastUpdate);
console.log(response);
commit('saveIcons', response);
return response;