Fix popup medias

This commit is contained in:
2026-01-14 23:00:33 +01:00
parent 14bf9e2fc8
commit da39ca6589
15 changed files with 75 additions and 44 deletions

View File

@@ -1,17 +1,31 @@
<script>
import spotIcon from './spotIcon.vue';
export default {
components: {
spotIcon
},
props: {
localTime: String,
offset: String
siteTime: String,
offset: String,
classes: String,
icon: String,
iconClasses: String
},
inject: ['spot']
inject: ['spot'],
computed: {
title() {
if(this.localTime != this.siteTime) return this.spot.lang('your_time', this.siteTime.slice(-5)) + ((this.offset != '0')?' ('+this.spot.lang('unit_d')+this.offset+')':'');
},
spotIconClasses() {
return this.iconClasses || 'fa-fw fa-lg';
}
}
}
</script>
<template>
<span>
<span>{{ localTime.substring(-5) }}</span>
<sup v-if="offset != '0'" :title="offset+' '+spot.lang('unit_day')+' ('+localTime.substring(0, 5)+')'">{{ ' '+offset }}</sup>
<span>&nbsp;{{ spot.lang('local_time', ' ').trim() }}</span>
</span>
<spotIcon v-if="icon" :icon="icon" :classes="spotIconClasses" :title="title" :text="localTime" />
<span v-else :class="classes" :title="title">{{ localTime }}</span>
</template>