Customize media markers

This commit is contained in:
2026-04-23 00:15:16 +02:00
parent ef88e600e3
commit 9e4fbe7ad4
4 changed files with 92 additions and 54 deletions

View File

@@ -13,35 +13,45 @@ export default {
projectRelTime
},
props: {
type: String,
options: Object,
medias: Array,
project: Object
},
inject: ['spot']
inject: ['spot'],
computed: {
timeIcon() {
return (this.type == 'media')?'image-shot':'time';
}
}
}
</script>
<template>
<div class="info-window">
<h1>
<spotIcon :icon="'message'" :classes="'fa-lg'" :text="spot.lang('post_message')+' '+spot.lang('counter', options.displayed_id)" />
<span class="message-type">({{ options.type }})</span>
</h1>
<div class="separator"></div>
<div :class="'info-window '+type">
<div class="header" v-if="type=='message'">
<h1>
<spotIcon :icon="'message'" :classes="'fa-lg'" :text="spot.lang('post_message')+' '+spot.lang('counter', options.displayed_id)" />
<span class="message-type">({{ options.type }})</span>
</h1>
<div class="separator"></div>
</div>
<p class="coordinates">
<spotIcon :icon="'coords'" :classes="'fa-fw fa-lg'" :margin="true" />
<projectMapLink :options="options" />
</p>
<p class="time">
<projectRelTime :icon="'time'" :localTime="options.formatted_time_local" :siteTime="options.formatted_time" :offset="options.day_offset" />
<projectRelTime :icon="timeIcon" :localTime="options.formatted_time_local" :siteTime="options.formatted_time" :offset="options.day_offset" />
<span v-if="project.mode==spot.consts.modes.blog"> ({{ options.relative_time }})</span>
</p>
<p class="weather" v-if="options.weather_icon && options.weather_icon!='unknown'" :title="options.weather_cond==''?'':spot.lang(options.weather_cond)">
<spotIcon :icon="options.weather_icon" :classes="'fa-fw fa-lg'" :text="options.weather_temp+'°C'" />
</p>
<div v-if="medias" class="separator"></div>
<div v-if="medias" class="medias">
<projectMediaLink v-for="media in medias" :options="media" :type="'marker'" />
<div v-if="medias.length > 0">
<div class="separator"></div>
<div class="medias">
<projectMediaLink v-for="media in medias" :options="media" :type="'marker'" />
</div>
</div>
</div>
</template>