Mercurial > gemma
changeset 1114:8d12056d602a store-refactoring
shortened store file imports
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 05 Nov 2018 13:41:53 +0100 |
parents | 595654ad3f66 |
children | 1b160eda22cf |
files | client/src/store.js client/src/store/application.js client/src/store/bottlenecks.js client/src/store/fairway.js client/src/store/map.js client/src/store/user.js client/src/store/usermanagement.js |
diffstat | 7 files changed, 15 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/store.js Mon Nov 05 13:36:44 2018 +0100 +++ b/client/src/store.js Mon Nov 05 13:41:53 2018 +0100 @@ -16,22 +16,22 @@ import Vue from "vue"; import Vuex from "vuex"; -import Application from "./store/application"; +import application from "./store/application"; import user from "./store/user"; import usermanagement from "./store/usermanagement"; import map from "./store/map"; -import FairwayProfile from "./store/fairway"; -import Bottlenecks from "./store/bottlenecks"; +import fairwayprofile from "./store/fairway"; +import bottlenecks from "./store/bottlenecks"; Vue.use(Vuex); export default new Vuex.Store({ modules: { - application: Application, - fairwayprofile: FairwayProfile, - bottlenecks: Bottlenecks, - map: map, - user: user, - usermanagement: usermanagement + application, + fairwayprofile, + bottlenecks, + map, + user, + usermanagement } });
--- a/client/src/store/application.js Mon Nov 05 13:36:44 2018 +0100 +++ b/client/src/store/application.js Mon Nov 05 13:41:53 2018 +0100 @@ -25,7 +25,7 @@ }; }; -const Application = { +export default { namespaced: true, state: { appTitle: process.env.VUE_APP_TITLE, @@ -128,5 +128,3 @@ }, actions: {} }; - -export default Application;
--- a/client/src/store/bottlenecks.js Mon Nov 05 13:36:44 2018 +0100 +++ b/client/src/store/bottlenecks.js Mon Nov 05 13:41:53 2018 +0100 @@ -16,7 +16,7 @@ import { WFS } from "ol/format.js"; import { displayError } from "../application/lib/errors.js"; -const Bottlenecks = { +export default { namespaced: true, state: { bottlenecks: [], @@ -96,5 +96,3 @@ } } }; - -export default Bottlenecks;
--- a/client/src/store/fairway.js Mon Nov 05 13:36:44 2018 +0100 +++ b/client/src/store/fairway.js Mon Nov 05 13:41:53 2018 +0100 @@ -21,7 +21,7 @@ const DEMOLEVEL = 149.345; -const FairwayProfile = { +export default { namespaced: true, state: { additionalSurvey: "", @@ -118,5 +118,3 @@ } } }; - -export default FairwayProfile;
--- a/client/src/store/map.js Mon Nov 05 13:36:44 2018 +0100 +++ b/client/src/store/map.js Mon Nov 05 13:41:53 2018 +0100 @@ -23,7 +23,7 @@ import { bbox as bboxStrategy } from "ol/loadingstrategy"; import { HTTP } from "../application/lib/http"; -const MapStore = { +export default { namespaced: true, state: { openLayersMap: null, @@ -239,5 +239,3 @@ } } }; - -export default MapStore;
--- a/client/src/store/user.js Mon Nov 05 13:36:44 2018 +0100 +++ b/client/src/store/user.js Mon Nov 05 13:41:53 2018 +0100 @@ -15,7 +15,7 @@ import { HTTP } from "../application/lib/http"; -const User = { +export default { namespaced: true, state: { authenticated: false, @@ -92,5 +92,3 @@ } } }; - -export default User;
--- a/client/src/store/usermanagement.js Mon Nov 05 13:36:44 2018 +0100 +++ b/client/src/store/usermanagement.js Mon Nov 05 13:41:53 2018 +0100 @@ -27,7 +27,7 @@ }; }; -const UserManagement = { +export default { namespaced: true, state: { users: null, @@ -145,5 +145,3 @@ } } }; - -export default UserManagement;