From d6e4e694172ae8857d532429b53e440b9c70e828 Mon Sep 17 00:00:00 2001 From: "Lukas Rieger (Blue)" Date: Sun, 14 Jan 2024 10:05:00 +0100 Subject: [PATCH] Fix unlisted markers being counted --- .../webapp/src/components/Menu/MarkerSet.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/BlueMapCommon/webapp/src/components/Menu/MarkerSet.vue b/BlueMapCommon/webapp/src/components/Menu/MarkerSet.vue index cbe4f5071..65bfd2d7e 100644 --- a/BlueMapCommon/webapp/src/components/Menu/MarkerSet.vue +++ b/BlueMapCommon/webapp/src/components/Menu/MarkerSet.vue @@ -6,9 +6,9 @@
-
- {{ markerSet.markers.length }} - {{ $t('markers.marker', markerSet.markers.length) }} +
+ {{ filteredMarkerCount }} + {{ $t('markers.marker', filteredMarkerCount) }}
{{ filteredMarkerSetCount }} @@ -46,6 +46,13 @@ export default { } return count; }, + filteredMarkerCount() { + let count = 0; + for (let marker of this.markerSet.markers) { + if (marker.listed) count++; + } + return count; + }, label() { if (this.markerSet.id === "bm-players") return this.$t("players.title"); return this.markerSet.label;