kopia lustrzana https://github.com/manuelkasper/sotlas-frontend
Include SMP track notes in GPX export
rodzic
99f17befc0
commit
1dc744460a
|
@ -32,7 +32,7 @@
|
||||||
{{ props.row.publicTransport.description }}
|
{{ props.row.publicTransport.description }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<article class="routeDescr" v-html="linkifyCoordinates(props.row.description)" />
|
<article class="routeDescr" v-html="linkifyCoordinates(props.row.htmlDescription ? props.row.htmlDescription : props.row.description)" />
|
||||||
<div class="author">by {{ props.row.author }}</div>
|
<div class="author">by {{ props.row.author }}</div>
|
||||||
<div class="track-download" v-if="props.row.track">
|
<div class="track-download" v-if="props.row.track">
|
||||||
<TrackLink :route="props.row" :summit="summit"><font-awesome-icon :icon="['far', 'file-download']" class="fa-icon" /> Download track (.gpx)</TrackLink>
|
<TrackLink :route="props.row" :summit="summit"><font-awesome-icon :icon="['far', 'file-download']" class="fa-icon" /> Download track (.gpx)</TrackLink>
|
||||||
|
|
|
@ -4,10 +4,11 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import tracks from '../mixins/tracks.js'
|
import tracks from '../mixins/tracks.js'
|
||||||
|
import utils from '../mixins/utils.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrackLink',
|
name: 'TrackLink',
|
||||||
mixins: [tracks],
|
mixins: [tracks, utils],
|
||||||
props: {
|
props: {
|
||||||
route: Object,
|
route: Object,
|
||||||
summit: Object
|
summit: Object
|
||||||
|
@ -42,8 +43,9 @@ export default {
|
||||||
</link>
|
</link>
|
||||||
</metadata>
|
</metadata>
|
||||||
<trk>
|
<trk>
|
||||||
<name>${this.route.title}</name>
|
<name>${this.escapeHtml(this.route.title)}</name>
|
||||||
<src>${this.route.author}</src>
|
<src>${this.route.author}</src>
|
||||||
|
<desc>${this.escapeHtml(this.route.description)}</desc>
|
||||||
<trkseg>
|
<trkseg>
|
||||||
${trkpts.join('\n')}
|
${trkpts.join('\n')}
|
||||||
</trkseg>
|
</trkseg>
|
||||||
|
|
|
@ -48,7 +48,8 @@ export default {
|
||||||
routes.push({
|
routes.push({
|
||||||
id: track.hdr_id,
|
id: track.hdr_id,
|
||||||
title: track.track_title,
|
title: track.track_title,
|
||||||
description: '<p>' + this.escapeHtml(track.track_notes) + '</p><p><small>Track imported from <a href="https://www.sotamaps.org" target="_blank">SMP</a></small></p>',
|
htmlDescription: '<p>' + this.escapeHtml(track.track_notes) + '</p><p><small>Track imported from <a href="https://www.sotamaps.org" target="_blank">SMP</a></small></p>',
|
||||||
|
description: track.track_notes,
|
||||||
author: track.callsign,
|
author: track.callsign,
|
||||||
distance,
|
distance,
|
||||||
ascent,
|
ascent,
|
||||||
|
|
Ładowanie…
Reference in New Issue