From f9e55ff6733d974a5d08ceeaf44fe33a660b744c Mon Sep 17 00:00:00 2001 From: James Lyne Date: Wed, 23 Jun 2021 18:18:42 +0100 Subject: [PATCH] Hide player list when playermarkers component is disabled (Fixes #21) --- src/components/Sidebar.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 66e2276..fbd7051 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -21,15 +21,17 @@ :aria-label="messageWorlds" :aria-expanded="mapsVisible" @keydown="handleMapsKeydown"> - @@ -73,6 +75,8 @@ export default defineComponent({ messageWorlds = computed(() => store.state.messages.worldsHeading), messagePlayers = computed(() => store.state.messages.playersHeading), + playerMakersEnabled = computed(() => !!store.state.components.playerMarkers), + playersVisible = computed(() => currentlyVisible.value.has('players')), mapsVisible = computed(() => currentlyVisible.value.has('maps')), followVisible = computed(() => { @@ -128,6 +132,7 @@ export default defineComponent({ playersVisible, mapsVisible, followVisible, + playerMakersEnabled, handleSidebarKeydown, handleMapsKeydown,