Mercurial > gemma
comparison client/src/logs/logs.vue @ 1123:d9e6a1f6f394 store-refactoring
moved all collapse flags for UI elements to store
UI elements can now be expanded/collapsed via the application store
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 06 Nov 2018 13:00:17 +0100 |
parents | 51e42c2e110a |
children | b23622905a3f |
comparison
equal
deleted
inserted
replaced
1122:a4c74a95c177 | 1123:d9e6a1f6f394 |
---|---|
101 * Software engineering by Intevation GmbH | 101 * Software engineering by Intevation GmbH |
102 * | 102 * |
103 * Author(s): | 103 * Author(s): |
104 * Thomas Junk <thomas.junk@intevation.de> | 104 * Thomas Junk <thomas.junk@intevation.de> |
105 */ | 105 */ |
106 import { mapGetters } from "vuex"; | 106 import { mapState } from "vuex"; |
107 import { HTTP } from "../application/lib/http.js"; | 107 import { HTTP } from "../application/lib/http.js"; |
108 import "../../node_modules/highlight.js/styles/paraiso-dark.css"; | 108 import "../../node_modules/highlight.js/styles/paraiso-dark.css"; |
109 import Vue from "vue"; | 109 import Vue from "vue"; |
110 import VueHighlightJS from "vue-highlightjs"; | 110 import VueHighlightJS from "vue-highlightjs"; |
111 Vue.use(VueHighlightJS); | 111 Vue.use(VueHighlightJS); |
142 disallow(e) { | 142 disallow(e) { |
143 e.target.blur(); | 143 e.target.blur(); |
144 } | 144 } |
145 }, | 145 }, |
146 computed: { | 146 computed: { |
147 ...mapGetters("application", ["sidebarCollapsed", "isUsermenuCollapsed"]), | 147 ...mapState("application", ["showSidebar"]), |
148 accesslogStyle() { | 148 accesslogStyle() { |
149 return { | 149 return { |
150 active: this.currentLog == ACCESSLOG, | 150 active: this.currentLog == ACCESSLOG, |
151 "nav-link": true | 151 "nav-link": true |
152 }; | 152 }; |
158 }; | 158 }; |
159 }, | 159 }, |
160 spacer() { | 160 spacer() { |
161 return { | 161 return { |
162 spacer: true, | 162 spacer: true, |
163 "spacer-expanded": !this.sidebarCollapsed, | 163 "spacer-expanded": this.showSidebar, |
164 "spacer-collapsed": this.sidebarCollapsed | 164 "spacer-collapsed": !this.showSidebar |
165 }; | 165 }; |
166 } | 166 } |
167 } | 167 } |
168 }; | 168 }; |
169 </script> | 169 </script> |