Customize media markers
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user