Mercurial > gemma
comparison client/src/components/Sidebar.vue @ 1296:99c039e86624
replaced manual store cleanup on logout with central store reset
The store files now provide a init method with which the store can be resetted on logout.
This is reasonable because missing store cleanups on logout caused bugs.
Furthermore the localStorage.clear() was replaced specific removal of values since currently there are also
saved cross profiles which should be persistent.
The initialization of the cut/line/polygon tool was moved from their respective buttons to the map store
right after saving the ol map object in the store. Before that change the map object was not present sometimes
when trying to initiate those tools.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Thu, 22 Nov 2018 17:00:26 +0100 |
parents | b9fd587d8ea0 |
children | 2738a6ae9ad8 |
comparison
equal
deleted
inserted
replaced
1295:cf041cf30418 | 1296:99c039e86624 |
---|---|
100 ]; | 100 ]; |
101 } | 101 } |
102 }, | 102 }, |
103 methods: { | 103 methods: { |
104 logoff() { | 104 logoff() { |
105 this.$store.commit("reset"); | |
105 this.$store.commit("user/clearAuth"); | 106 this.$store.commit("user/clearAuth"); |
106 this.$store.commit("application/showSidebar", false); | |
107 this.$store.commit("application/showSplitscreen", false); | |
108 this.$store.dispatch("fairwayprofile/clearSelection"); | |
109 this.$router.push("/login"); | 107 this.$router.push("/login"); |
110 }, | 108 }, |
111 toggleContextBox(context) { | 109 toggleContextBox(context) { |
112 this.$router.push("/"); | 110 this.$router.push("/"); |
113 this.$store.commit("application/showContextBox", true); | 111 this.$store.commit("application/showContextBox", true); |