Fix media marker popup
This commit is contained in:
@@ -17,11 +17,27 @@ export default {
|
||||
},
|
||||
inject: ['lang', 'consts'],
|
||||
computed: {
|
||||
timeIcon() {
|
||||
return (this.options.type == 'media')?'image-shot':'time';
|
||||
timeinfo() {
|
||||
return (this.options.type == 'media')?
|
||||
{
|
||||
icon: 'image-shot',
|
||||
local_time: this.options.taken_on_formatted_time_local,
|
||||
site_time: this.options.taken_on_formatted_time,
|
||||
offset: this.options.taken_on_day_offset,
|
||||
relative_time: this.options.taken_on_relative_time
|
||||
}:
|
||||
{
|
||||
icon: 'time',
|
||||
local_time: this.options.formatted_time_local,
|
||||
site_time: this.options.formatted_time,
|
||||
offset: this.options.day_offset,
|
||||
relative_time: this.options.relative_time
|
||||
};
|
||||
},
|
||||
medias() {
|
||||
return (this.options.type == 'media')?[this.options]:this.options?.medias;
|
||||
localTime() {
|
||||
return this.timeinfo.local_time +
|
||||
((this.project.mode == this.consts.modes.blog)?' (' + this.timeinfo.relative_time + ')':'')
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,16 +69,15 @@ export default {
|
||||
<spotIcon :icon="'altitude'" width="fixed" size="lg" :text="options.altitude+'m'" />
|
||||
</div>
|
||||
<div class="section time">
|
||||
<projectRelTime :icon="timeIcon" :localTime="options.formatted_time_local" :siteTime="options.formatted_time" :offset="options.day_offset" />
|
||||
<span v-if="project.mode==consts.modes.blog"> ({{ options.relative_time }})</span>
|
||||
<projectRelTime :icon="timeinfo.icon" :localTime="localTime" :siteTime="timeinfo.site_time" :offset="timeinfo.offset" />
|
||||
</div>
|
||||
<div class="section weather" v-if="options.weather_icon && options.weather_icon!='unknown'" :title="options.weather_cond==''?'':lang.get('weather.'+options.weather_icon)">
|
||||
<spotIcon :icon="options.weather_icon" width="fixed" size="lg" :text="options.weather_temp+'°C'" />
|
||||
</div>
|
||||
<div v-if="medias" class="section medias">
|
||||
<div v-if="options.medias" class="section medias">
|
||||
<spotIcon v-if="options.type=='message'" icon="media" width="fixed" size="lg" :text="lang.get('media.nearby')" />
|
||||
<div class="medias-list">
|
||||
<projectMediaLink v-for="media in medias" :options="media" :type="'marker'" />
|
||||
<projectMediaLink v-for="media in options?.medias" :options="media" :type="'marker'" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user