Added search config to disable some unneeded buttons
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
import type { MapMarker, MapMarkerGroup, PlayerMarker } from '@/types/Leaflet';
|
||||
import type { SearchConfig } from '@/types/Map';
|
||||
import type { SearchMode } from '@/types/Search';
|
||||
import { onClickOutside, useFocus, useFocusWithin, useLocalStorage, useMagicKeys, whenever } from '@vueuse/core';
|
||||
import { computed, onMounted, ref, onUpdated, watch } from 'vue';
|
||||
import SearchMarkersTags from './SearchMarkersTags.vue';
|
||||
import { computed, onMounted, onUpdated, ref, watch } from 'vue';
|
||||
import SearchMapSwitch from './SearchMapSwitch.vue';
|
||||
import SearchMarkersTags from './SearchMarkersTags.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
markers: MapMarker[],
|
||||
players: PlayerMarker,
|
||||
mapKey?: string
|
||||
mapKey?: string,
|
||||
searchConfig?: SearchConfig
|
||||
}>()
|
||||
|
||||
const customMarkersKey = props.mapKey ? `custom-markers-${props.mapKey}` : 'custom-markers'
|
||||
@@ -261,6 +263,7 @@ function resetAllFields(actionAfter?: "focusAfter") {
|
||||
<SearchMarkersTags
|
||||
:current-search-mode="currentSearchMode"
|
||||
:custom-markers="customMarkersData"
|
||||
:search-config="props.searchConfig"
|
||||
@on-category-switch="handleCategorySwitch"
|
||||
/>
|
||||
</nav>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<script lang="ts" setup>
|
||||
import type { MapMarker, MapMarkerGroup } from '@/types/Leaflet';
|
||||
import type { SearchConfig } from '@/types/Map';
|
||||
import type { SearchMode } from '@/types/Search';
|
||||
|
||||
defineProps<{
|
||||
currentSearchMode: SearchMode,
|
||||
customMarkers: MapMarker[]
|
||||
customMarkers: MapMarker[],
|
||||
searchConfig?: SearchConfig
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -18,7 +20,7 @@ function emitCategorySwitch(newCategory: MapMarkerGroup) {
|
||||
|
||||
<template>
|
||||
<menu class="tag-list">
|
||||
<li>
|
||||
<li v-if="!searchConfig?.disableQuests">
|
||||
<button
|
||||
@click="emitCategorySwitch('quests')"
|
||||
class="red"
|
||||
@@ -35,7 +37,7 @@ function emitCategorySwitch(newCategory: MapMarkerGroup) {
|
||||
</button>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<li v-if="!searchConfig?.disableCapitals">
|
||||
<button
|
||||
@click="emitCategorySwitch('capitals')"
|
||||
class="blue"
|
||||
@@ -52,7 +54,7 @@ function emitCategorySwitch(newCategory: MapMarkerGroup) {
|
||||
</button>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<li v-if="!searchConfig?.disableLandmarks">
|
||||
<button
|
||||
@click="emitCategorySwitch('landmarks')"
|
||||
class="orange"
|
||||
|
||||
Reference in New Issue
Block a user