diff client/src/components/identify/Identify.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 20e4efa64320
children ef928c63388a
line wrap: on
line diff
--- a/client/src/components/identify/Identify.vue	Mon Feb 25 14:30:31 2019 +0100
+++ b/client/src/components/identify/Identify.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="info" class="mr-2"></font-awesome-icon>
-        <translate>Identified</translate>
-        <font-awesome-icon
-          icon="times"
-          class="ml-auto text-muted"
-          @click="$store.commit('application/showIdentify', false)"
-        ></font-awesome-icon>
-      </h6>
+      <UIBoxHeader icon="info" title="Identified" :closeCallback="close" />
       <div class="features flex-grow-1 text-left">
         <div v-if="currentMeasurement">
           <small class="d-block bg-dark text-light text-center px-2 py-1">
@@ -129,6 +121,9 @@
     ...mapState("map", ["currentMeasurement"])
   },
   methods: {
+    close() {
+      this.$store.commit("application/showIdentify", false);
+    },
     featureId(feature) {
       // cut away everything from the last . to the end
       return feature.getId().replace(/[.][^.]*$/, "");