added some map stuff
added a few backend routes
This commit is contained in:
+14
-9
@@ -1,20 +1,16 @@
|
||||
import Vue from 'vue';
|
||||
import Vuex from 'vuex';
|
||||
import VuexPersistence from 'vuex-persist';
|
||||
import authStore from "@/store/auth.store";
|
||||
import authStore from '@/store/auth.store';
|
||||
import globalStore from '@/store/global.store';
|
||||
import areaStore from '@/store/area.store';
|
||||
|
||||
Vue.use(Vuex);
|
||||
// set up persistence storage plugin
|
||||
const vuexPersistence = new VuexPersistence({
|
||||
key: process.env.VUE_APP_TITLE,
|
||||
storage: window.localStorage,
|
||||
reducer: (state: any) => ({
|
||||
auth: {
|
||||
token: state.auth.token,
|
||||
user: state.auth.user
|
||||
}
|
||||
}),
|
||||
filter: (mutation) => ['auth/saveLogin'].includes(mutation.type)
|
||||
filter: (mutation) => ['auth/saveToken', 'global/saveArea'].includes(mutation.type)
|
||||
});
|
||||
|
||||
export default new Vuex.Store({
|
||||
@@ -25,6 +21,15 @@ export default new Vuex.Store({
|
||||
auth: {
|
||||
namespaced: true,
|
||||
...authStore
|
||||
},
|
||||
global: {
|
||||
namespaced: true,
|
||||
...globalStore
|
||||
},
|
||||
area: {
|
||||
namespaced: true,
|
||||
...areaStore
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [vuexPersistence.plugin]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user