34 lines
609 B
Vue
34 lines
609 B
Vue
<script setup lang="ts">
|
|
import type { Node } from "~/types"
|
|
|
|
const props = defineProps<{
|
|
node: Node
|
|
}>()
|
|
|
|
defineEmits<{
|
|
route: []
|
|
}>()
|
|
|
|
const place = computed(() => props.node.event.location?.name ?? null)
|
|
</script>
|
|
|
|
<template>
|
|
<MetaPill
|
|
v-if="!place"
|
|
icon="carbon:location"
|
|
ghost
|
|
:title="$t('voyage.pill.placeAdd')"
|
|
@click="$emit('route')"
|
|
>
|
|
{{ $t("voyage.pill.placeGhost") }}
|
|
</MetaPill>
|
|
<MetaPill
|
|
v-else
|
|
icon="carbon:location"
|
|
tone="neutral"
|
|
:title="$t('voyage.pill.placeView')"
|
|
@click="$emit('route')"
|
|
>
|
|
{{ place }}
|
|
</MetaPill>
|
|
</template>
|