Harmonize time fields v1

This commit is contained in:
2026-04-18 08:57:32 +02:00
parent fcbb3d9d14
commit bcc5e9e0cd
3 changed files with 19 additions and 21 deletions

View File

@@ -58,10 +58,10 @@ export default {
<spotIcon :icon="'post'" :classes="'fa-lg fa-fw push'" :text-classes="'comment-text'" :text="options.comment" />
</span>
<span ref="postedon" class="lb-caption-line">
<projectRelTime :icon="'upload'" :localTime="options.posted_on_formatted_local" :siteTime="options.posted_on_formatted" :offset="options.posted_on_formatted_day_offset" />
<projectRelTime :icon="'upload'" :localTime="options.posted_on_formatted_time_local" :siteTime="options.posted_on_formatted_time" :offset="options.posted_on_day_offset" />
</span>
<span ref="takenon" class="lb-caption-line">
<projectRelTime :icon="options.subtype+'-shot'" :localTime="options.taken_on_formatted_local" :siteTime="options.taken_on_formatted" :offset="options.taken_on_formatted_day_offset" />
<projectRelTime :icon="options.subtype+'-shot'" :localTime="options.taken_on_formatted_time_local" :siteTime="options.taken_on_formatted_time" :offset="options.taken_on_day_offset" />
</span>
</div>
</template>

View File

@@ -1083,7 +1083,7 @@ export default class Project {
}
getMediaLink(asData, sType) {
var bTimeDiff = (asData.posted_on_formatted && asData.posted_on_formatted_local != asData.posted_on_formatted);
var bTimeDiff = (asData.posted_on_formatted_time && asData.posted_on_formatted_time_local != asData.posted_on_formatted_time);
var $Comment = (!asData.comment || asData.comment == '')?'':
$('<span>', {'class': 'lb-caption-line comment desktop', 'title': asData.comment})
@@ -1091,14 +1091,14 @@ export default class Project {
.append($('<span>', {'class':'comment-text'}).text(asData.comment));
var $PostedOn =
$('<span>', {'class': 'lb-caption-line', title: bTimeDiff?this.spot.lang('local_time', asData.posted_on_formatted_local):''})
$('<span>', {'class': 'lb-caption-line', title: bTimeDiff?this.spot.lang('local_time', asData.posted_on_formatted_time_local):''})
.addIcon('fa-upload fa-lg fa-fw', true)
.append(asData.posted_on_formatted);
.append(asData.posted_on_formatted_time);
var $TakenOn = (asData.taken_on == asData.posted_on)?'':
$('<span>', {'class': 'lb-caption-line', title: bTimeDiff?this.spot.lang('local_time', asData.taken_on_formatted_local):''})
$('<span>', {'class': 'lb-caption-line', title: bTimeDiff?this.spot.lang('local_time', asData.taken_on_formatted_time_local):''})
.addIcon('fa-'+asData.subtype+'-shot fa-lg fa-fw', true)
.append(asData.taken_on_formatted);
.append(asData.taken_on_formatted_time);
var $Title = $('<div>')
.append($Comment)