Add project popup
All checks were successful
Deploy Spot / deploy (push) Successful in 38s

This commit is contained in:
2026-05-19 17:49:06 +02:00
parent 93a72c628e
commit c43539b640
6 changed files with 69 additions and 32 deletions

View File

@@ -17,6 +17,13 @@ export default {
},
inject: ['lang', 'consts', 'isMobile'],
computed: {
activeTimeInterval() {
if(this.options.mode == this.consts.modes.blog) return this.lang.get('project.wip');
const sYearFrom = this.options.active_from.substr(0, 4);
const sYearTo = this.options.active_to.substr(0, 4);
return (sYearFrom == sYearTo)?sYearFrom:(sYearFrom + '-' + sYearTo);
},
timeinfo() {
return (this.options.type == 'media')?
{
@@ -45,7 +52,7 @@ export default {
<template>
<div :class="options.type+' '+options.subtype">
<div class="header" v-if="options.type=='track'">
<div class="header" v-if="options.type == 'track' || options.type == 'project'">
<h1>
<spotIcon :icon="options.subtype" size="lg" :text="this.options.name" width="auto" :textClasses="options.subtype" />
</h1>
@@ -60,6 +67,9 @@ export default {
<spotIcon :title="lang.get('stats.elevation_loss')" :icon="'elev-drop'" width="fixed" size="lg" :text="options.elev_drop+'m'" />
</div>
</div>
<div v-else-if="options.type=='project'" class="section time">
<spotIcon icon="time" width="fixed" size="lg" :text="activeTimeInterval" />
</div>
<div v-else>
<div class="section time">
<projectRelTime :icon="timeinfo.icon" :localTime="localTime" :siteTime="timeinfo.site_time" :offset="timeinfo.offset" />