# HG changeset patch # User Markus Kottlaender # Date 1560852138 -7200 # Node ID 0300282b953754dacd5bb06b7ff074d1b1140a4c # Parent 0227670dedd5e1b54f84aaaef17b46f6b3da5cb1 client: configuration: changed loading strategy Only load configuration values from backend when entering the main/map view or systemconfiguration page diff -r 0227670dedd5 -r 0300282b9537 client/src/components/Login.vue --- a/client/src/components/Login.vue Mon Jun 17 18:45:48 2019 +0200 +++ b/client/src/components/Login.vue Tue Jun 18 12:02:18 2019 +0200 @@ -193,10 +193,8 @@ .dispatch("user/login", { user, password }) .then(() => { this.loginFailed = false; - this.$store.dispatch("application/loadConfig").then(() => { - this.$router.push(localStorage.getItem("tempRoute") || "/"); - localStorage.removeItem("tempRoute"); - }); + this.$router.push(localStorage.getItem("tempRoute") || "/"); + localStorage.removeItem("tempRoute"); }) .catch(error => { this.loginFailed = true; diff -r 0227670dedd5 -r 0300282b9537 client/src/components/systemconfiguration/Systemconfiguration.vue --- a/client/src/components/systemconfiguration/Systemconfiguration.vue Mon Jun 17 18:45:48 2019 +0200 +++ b/client/src/components/systemconfiguration/Systemconfiguration.vue Tue Jun 18 12:02:18 2019 +0200 @@ -48,6 +48,9 @@ systemconfigurationLabel() { return this.$gettext("Systemconfiguration"); } + }, + mounted() { + this.$store.dispatch("application/loadConfig"); } }; diff -r 0227670dedd5 -r 0300282b9537 client/src/router.js --- a/client/src/router.js Mon Jun 17 18:45:48 2019 +0200 +++ b/client/src/router.js Tue Jun 18 12:02:18 2019 +0200 @@ -92,7 +92,7 @@ store.commit("application/showContextBox", false); store.commit("application/contextBoxContent", ""); store.commit("application/showSearchbar", false); - next(); + store.dispatch("application/loadConfig").then(() => next()); } }, { @@ -213,7 +213,6 @@ store.commit("user/setExpires", expiresFromPastSession); store.commit("user/setRoles", localStorage.getItem("roles")); store.commit("user/setIsAuthenticate", true); - store.dispatch("application/loadConfig"); } else { store.commit("reset"); store.commit("user/clearAuth");