Client - display elevation on card and list for workouts w/o elevation
This commit is contained in:
parent
0c0138b867
commit
47ec18e0a3
@ -114,7 +114,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="data altitude" v-if="workout && workout.with_gpx">
|
<div class="data altitude" v-if="hasElevation(workout)">
|
||||||
<i class="fa fa-location-arrow" aria-hidden="true" />
|
<i class="fa fa-location-arrow" aria-hidden="true" />
|
||||||
<div class="data-values">
|
<div class="data-values">
|
||||||
+<Distance
|
+<Distance
|
||||||
@ -167,6 +167,10 @@
|
|||||||
const locale: ComputedRef<Locale> = computed(
|
const locale: ComputedRef<Locale> = computed(
|
||||||
() => store.getters[ROOT_STORE.GETTERS.LOCALE]
|
() => store.getters[ROOT_STORE.GETTERS.LOCALE]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
function hasElevation(workout: IWorkout): boolean {
|
||||||
|
return workout && workout.ascent !== null && workout.descent !== null
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -134,7 +134,7 @@
|
|||||||
{{ $t('workouts.ASCENT') }}
|
{{ $t('workouts.ASCENT') }}
|
||||||
</span>
|
</span>
|
||||||
<Distance
|
<Distance
|
||||||
v-if="workout.with_gpx"
|
v-if="workout.ascent !== null"
|
||||||
:distance="workout.ascent"
|
:distance="workout.ascent"
|
||||||
unitFrom="m"
|
unitFrom="m"
|
||||||
:useImperialUnits="user.imperial_units"
|
:useImperialUnits="user.imperial_units"
|
||||||
@ -145,7 +145,7 @@
|
|||||||
{{ $t('workouts.DESCENT') }}
|
{{ $t('workouts.DESCENT') }}
|
||||||
</span>
|
</span>
|
||||||
<Distance
|
<Distance
|
||||||
v-if="workout.with_gpx"
|
v-if="workout.descent !== null"
|
||||||
:distance="workout.descent"
|
:distance="workout.descent"
|
||||||
unitFrom="m"
|
unitFrom="m"
|
||||||
:useImperialUnits="user.imperial_units"
|
:useImperialUnits="user.imperial_units"
|
||||||
|
Loading…
Reference in New Issue
Block a user