From 72ea95d52b7bcb5fb52c31583735420ec1b42609 Mon Sep 17 00:00:00 2001 From: James Lyne Date: Sun, 13 Jun 2021 01:16:32 +0100 Subject: [PATCH] Hide context menu map list when there's no other maps to switch to --- src/components/map/MapContextMenu.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/map/MapContextMenu.vue b/src/components/map/MapContextMenu.vue index c9cf428..8e066c5 100644 --- a/src/components/map/MapContextMenu.vue +++ b/src/components/map/MapContextMenu.vue @@ -19,7 +19,7 @@
  • - + @@ -63,6 +63,7 @@ export default defineComponent({ currentWorld = computed(() => store.state.currentWorld), currentMap = computed(() => store.state.currentMap), currentZoom = computed(() => store.state.currentZoom), + mapCount = computed(() => currentWorld.value ? currentWorld.value.maps.size : 0), location = computed(() => { if (!event.value) { @@ -215,6 +216,7 @@ export default defineComponent({ locationLabel, locationCopy, currentWorld, + mapCount, style, pan, @@ -278,4 +280,4 @@ export default defineComponent({ } } } - \ No newline at end of file +