changeset 4666:5fb3134c3a0c

profiles: indicator for multiple surveys when menu is closed
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 14 Oct 2019 16:35:54 +0200
parents c47c8085cc7e
children 63c529172334
files client/src/components/toolbar/Profiles.vue
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/toolbar/Profiles.vue	Mon Oct 14 16:26:46 2019 +0200
+++ b/client/src/components/toolbar/Profiles.vue	Mon Oct 14 16:35:54 2019 +0200
@@ -8,6 +8,17 @@
       icon="chart-area"
       :class="{ 'text-info': showProfiles }"
     />
+    <span
+      v-if="twoMapsVisible"
+      :class="[
+        'indicator',
+        {
+          show: true
+        }
+      ]"
+    >
+      2
+    </span>
   </div>
 </template>
 
@@ -31,6 +42,10 @@
   name: "profiles",
   computed: {
     ...mapState("application", ["showProfiles"]),
+    ...mapState("map", ["openLayersMaps"]),
+    twoMapsVisible() {
+      return this.openLayersMaps.length === 2 && !this.showProfiles;
+    },
     label() {
       return this.$gettext("Bottleneck Surveys");
     }