Changed closed icon and added one token
This commit is contained in:
@@ -5,11 +5,14 @@ import type { PointTuple } from 'leaflet';
|
||||
import { computed, ref } from 'vue';
|
||||
import { cn } from '@/lib/cn';
|
||||
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
marker: ReviewMarker
|
||||
}>()
|
||||
|
||||
const iconSize = ref<PointTuple>([38, 38])
|
||||
const normalIconSize: PointTuple = [38, 38]
|
||||
const tinyIconSize: PointTuple = [28, 28]
|
||||
|
||||
const iconSize = ref<PointTuple>(props.marker.closed ? tinyIconSize : normalIconSize)
|
||||
const iconAnchor = computed<PointTuple>(() => [iconSize.value[0] / 2, iconSize.value[1]])
|
||||
const popupOffset = [0, iconSize.value[0] * -0.66]
|
||||
</script>
|
||||
@@ -33,24 +36,28 @@ const popupOffset = [0, iconSize.value[0] * -0.66]
|
||||
{ 'grayscale': marker.closed }
|
||||
)"
|
||||
>
|
||||
<img v-if="marker.type === 'bar'" src="/map/icons/bar.svg" />
|
||||
<img v-if="marker.type === 'bakery'" src="/map/icons/bakery.svg" />
|
||||
<img v-if="marker.type === 'tea-shop'" src="/map/icons/tea-shop.svg" />
|
||||
<img v-if="marker.type === 'coffee-shop'" src="/map/icons/coffee-shop.svg" />
|
||||
<img v-if="marker.type === 'ice-cream'" src="/map/icons/ice-cream.svg" />
|
||||
<img v-if="marker.type === 'food-truck'" src="/map/icons/truck.svg" />
|
||||
<img v-if="marker.closed" src="/map/icons/ghost.svg" />
|
||||
|
||||
<template v-else-if="marker.type === 'restaurant'">
|
||||
<img v-if="marker.food === 'asian'" src="/map/icons/asian.svg" />
|
||||
<img v-else-if="marker.food === 'burgers'" src="/map/icons/burgers.svg" />
|
||||
<!-- <img v-else-if="marker.food === 'creperie'" src="/map/icons/creperie.svg" /> -->
|
||||
<!-- <img v-else-if="marker.food === 'eastern'" src="/map/icons/eastern.svg" /> -->
|
||||
<img v-else-if="marker.food === 'fast-food'" src="/map/icons/fast-food.svg" />
|
||||
<img v-else-if="marker.food === 'italian'" src="/map/icons/italian.svg" />
|
||||
<img v-else-if="marker.food === 'seafood'" src="/map/icons/seafood.svg" />
|
||||
<!-- <img v-else-if="marker.food === 'street-food'" src="/map/icons/street-food.svg" /> -->
|
||||
<img v-else-if="marker.food === 'vegetarian'" src="/map/icons/vegetarian.svg" />
|
||||
<img v-else src="/map/icons/restaurant.svg" />
|
||||
<template v-else>
|
||||
<img v-if="marker.type === 'bar'" src="/map/icons/bar.svg" />
|
||||
<img v-else-if="marker.type === 'bakery'" src="/map/icons/bakery.svg" />
|
||||
<img v-else-if="marker.type === 'tea-shop'" src="/map/icons/tea-shop.svg" />
|
||||
<img v-else-if="marker.type === 'coffee-shop'" src="/map/icons/coffee-shop.svg" />
|
||||
<img v-else-if="marker.type === 'ice-cream'" src="/map/icons/ice-cream.svg" />
|
||||
<img v-else-if="marker.type === 'food-truck'" src="/map/icons/truck.svg" />
|
||||
|
||||
<template v-else-if="marker.type === 'restaurant'">
|
||||
<img v-if="marker.food === 'asian'" src="/map/icons/asian.svg" />
|
||||
<img v-else-if="marker.food === 'burgers'" src="/map/icons/burgers.svg" />
|
||||
<!-- <img v-else-if="marker.food === 'creperie'" src="/map/icons/creperie.svg" /> -->
|
||||
<!-- <img v-else-if="marker.food === 'eastern'" src="/map/icons/eastern.svg" /> -->
|
||||
<img v-else-if="marker.food === 'fast-food'" src="/map/icons/fast-food.svg" />
|
||||
<img v-else-if="marker.food === 'italian'" src="/map/icons/italian.svg" />
|
||||
<img v-else-if="marker.food === 'seafood'" src="/map/icons/seafood.svg" />
|
||||
<!-- <img v-else-if="marker.food === 'street-food'" src="/map/icons/street-food.svg" /> -->
|
||||
<img v-else-if="marker.food === 'vegetarian'" src="/map/icons/vegetarian.svg" />
|
||||
<img v-else src="/map/icons/restaurant.svg" />
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user