2021-08-18 11:19:24 -07:00
|
|
|
<template>
|
2021-10-15 09:26:21 -07:00
|
|
|
<span>
|
2021-10-27 12:00:45 -07:00
|
|
|
<span v-if="range" class="badge bg-primary">{{ event.getRange(year) }}</span>
|
2021-08-18 11:19:24 -07:00
|
|
|
<Flag v-if="event.flag" name="" alt="" :img="`/flags/${event.flag}.png`"/>
|
|
|
|
<Icon v-else v="arrow-circle-right"/>
|
2021-09-25 07:25:40 -07:00
|
|
|
<T v-if="$te(`calendar.events.${eventName}`)" :params="{param: eventParam}">calendar.events.{{eventName}}</T>
|
|
|
|
<LinkedText v-else :text="eventName"/>
|
2021-10-27 12:00:45 -07:00
|
|
|
<a :href="`/api/queer-calendar-${config.locale}-${year}-${event.getUuid()}.ics`" class="small" :aria-label="$t('crud.download') + ' .ics'" :title="$t('crud.download') + ' .ics'">
|
|
|
|
<Icon v="calendar-plus"/>
|
|
|
|
</a>
|
2021-10-15 09:26:21 -07:00
|
|
|
</span>
|
2021-08-18 11:19:24 -07:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
event: { required: true },
|
2021-10-27 12:00:45 -07:00
|
|
|
year: { 'default': () => (new Date).getFullYear() },
|
|
|
|
range: { type: Boolean },
|
2021-08-18 11:19:24 -07:00
|
|
|
},
|
2021-09-25 07:25:40 -07:00
|
|
|
computed: {
|
|
|
|
eventName() {
|
|
|
|
return this.event.name.split('$')[0];
|
|
|
|
},
|
|
|
|
eventParam() {
|
|
|
|
return this.event.name.split('$')[1] || null;
|
|
|
|
},
|
|
|
|
}
|
2021-08-18 11:19:24 -07:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|