Mercurial > gemma
diff client/src/components/layers/Layers.vue @ 2387:f185503ef35a
client: unified box's header styles by creating a reusable component
The clients html/css and resulting look and feel of the app is partially very inconsistent.
By moving code to more small and reusable components consistency will hopefully be increased.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 25 Feb 2019 15:02:34 +0100 |
parents | 531e776cb81d |
children | bb5286acfee2 |
line wrap: on
line diff
--- a/client/src/components/layers/Layers.vue Mon Feb 25 14:30:31 2019 +0100 +++ b/client/src/components/layers/Layers.vue Mon Feb 25 15:02:34 2019 +0100 @@ -6,15 +6,7 @@ ]" > <div style="width: 18rem"> - <h6 class="mb-0 py-2 px-3 border-bottom d-flex align-items-center"> - <font-awesome-icon icon="layer-group" class="mr-2"></font-awesome-icon - ><translate>Layers</translate> - <font-awesome-icon - icon="times" - class="ml-auto text-muted pointer" - @click="$store.commit('application/showLayers', false)" - ></font-awesome-icon> - </h6> + <UIBoxHeader icon="layer-group" title="Layers" :closeCallback="close" /> <div class="d-flex flex-column p-3 small"> <Layerselect v-for="(layer, index) in layersForLegend" @@ -55,6 +47,9 @@ ...mapState("application", ["showLayers"]) }, methods: { + close() { + this.$store.commit("application/showLayers", false); + }, visibilityToggled(layer) { this.$store.commit("map/toggleVisibility", layer); }