Added env variables to disable some options
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
---
|
||||
import { ENABLE_CUSTOM_MARKERS } from "astro:env/server";
|
||||
|
||||
import type { MapMarker, PlayerMarker } from '@/types/Leaflet';
|
||||
import type { MapProps } from '@/types/Map';
|
||||
import MarkerCreator from './overlay/MarkerCreator.vue';
|
||||
@@ -23,8 +25,10 @@ const {
|
||||
<div class="map-wrapper">
|
||||
<main class="world-wrapper">
|
||||
<div id="world"></div>
|
||||
|
||||
<MarkerCreator client:only="vue" mapKey={mapKey} />
|
||||
|
||||
{ENABLE_CUSTOM_MARKERS &&
|
||||
<MarkerCreator client:only="vue" mapKey={mapKey} />
|
||||
}
|
||||
</main>
|
||||
|
||||
<div style="height: 0; width: 0; overflow: hidden; display: none;">
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
---
|
||||
import { ENABLE_BREADCRUMB, ENABLE_I18N, ENABLE_TOOLBAR, ENABLE_TOOLBAR_TAGS } from "astro:env/server";
|
||||
|
||||
import type { MapMarker, PlayerMarker } from "@/types/Leaflet";
|
||||
import type { MapOverlayProps } from "@/types/Map";
|
||||
|
||||
@@ -25,14 +27,27 @@ const currentUrl = Astro.url
|
||||
|
||||
<div class="world-overlay">
|
||||
<div class="top-bar">
|
||||
<SearchMarkers client:only="vue" mapKey={mapKey} markers={markers} players={players} searchConfig={searchConfig} >
|
||||
<div slot="fallback" style="height: 45px;"></div>
|
||||
</SearchMarkers>
|
||||
{ENABLE_TOOLBAR &&
|
||||
<SearchMarkers
|
||||
client:only="vue"
|
||||
mapKey={mapKey}
|
||||
markers={markers}
|
||||
players={players}
|
||||
searchConfig={searchConfig}
|
||||
disableTags={!ENABLE_TOOLBAR_TAGS}
|
||||
>
|
||||
<div slot="fallback" style="height: 45px;"></div>
|
||||
</SearchMarkers>
|
||||
}
|
||||
|
||||
<LangSwitcher currentUrl={currentUrl} client:only="vue" />
|
||||
{ENABLE_I18N &&
|
||||
<LangSwitcher currentUrl={currentUrl} client:only="vue" />
|
||||
}
|
||||
</div>
|
||||
|
||||
<MapOverlayBreadcrumbs breadcrumbs={breadcrumbs} />
|
||||
{ENABLE_BREADCRUMB &&
|
||||
<MapOverlayBreadcrumbs breadcrumbs={breadcrumbs} />
|
||||
}
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -20,6 +20,7 @@ const props = defineProps<{
|
||||
players: PlayerMarker,
|
||||
mapKey?: string,
|
||||
searchConfig?: SearchConfig
|
||||
disableTags?: boolean
|
||||
}>()
|
||||
|
||||
const customMarkersKey = props.mapKey ? `custom-markers-${props.mapKey}` : 'custom-markers'
|
||||
@@ -286,6 +287,7 @@ function resetAllFields(actionAfter?: "focusAfter") {
|
||||
</div>
|
||||
|
||||
<SearchMarkersTags
|
||||
v-if="!props.disableTags"
|
||||
:current-search-mode="currentSearchMode"
|
||||
:custom-markers="customMarkersData"
|
||||
:search-config="props.searchConfig"
|
||||
|
||||
Reference in New Issue
Block a user