Hide context menu map list when there's no other maps to switch to
This commit is contained in:
parent
ae9358bdbe
commit
72ea95d52b
@ -19,7 +19,7 @@
|
|||||||
<li role="none">
|
<li role="none">
|
||||||
<button type="button" role="menuitem" @click.prevent="pan">{{ messageCenterHere }}</button>
|
<button type="button" role="menuitem" @click.prevent="pan">{{ messageCenterHere }}</button>
|
||||||
</li>
|
</li>
|
||||||
<WorldListItem v-if="currentWorld" :world="currentWorld" name="context"></WorldListItem>
|
<WorldListItem v-if="currentWorld && mapCount > 1" :world="currentWorld" name="context"></WorldListItem>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</template>
|
</template>
|
||||||
@ -63,6 +63,7 @@ export default defineComponent({
|
|||||||
currentWorld = computed(() => store.state.currentWorld),
|
currentWorld = computed(() => store.state.currentWorld),
|
||||||
currentMap = computed(() => store.state.currentMap),
|
currentMap = computed(() => store.state.currentMap),
|
||||||
currentZoom = computed(() => store.state.currentZoom),
|
currentZoom = computed(() => store.state.currentZoom),
|
||||||
|
mapCount = computed(() => currentWorld.value ? currentWorld.value.maps.size : 0),
|
||||||
|
|
||||||
location = computed(() => {
|
location = computed(() => {
|
||||||
if (!event.value) {
|
if (!event.value) {
|
||||||
@ -215,6 +216,7 @@ export default defineComponent({
|
|||||||
locationLabel,
|
locationLabel,
|
||||||
locationCopy,
|
locationCopy,
|
||||||
currentWorld,
|
currentWorld,
|
||||||
|
mapCount,
|
||||||
style,
|
style,
|
||||||
|
|
||||||
pan,
|
pan,
|
||||||
|
Loading…
Reference in New Issue
Block a user