mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
chore: selecting station checkpoint from url
This commit is contained in:
@@ -3,10 +3,16 @@
|
||||
class="stop-label"
|
||||
:data-minor="stop.isSBL || (stop.nameRaw.endsWith(', po') && !stop.duration)"
|
||||
>
|
||||
<router-link :to="`/scenery?station=${stop.sceneryName}`" @click="closeModal">
|
||||
<router-link
|
||||
v-if="/(, podg|<strong>)/.test(stop.nameHtml)"
|
||||
:to="sceneryHref"
|
||||
@click="closeModal"
|
||||
>
|
||||
<span class="name" v-html="stop.nameHtml"></span>
|
||||
</router-link>
|
||||
|
||||
<span v-else class="name" v-html="stop.nameHtml"></span>
|
||||
|
||||
<span
|
||||
v-if="stop.position != 'begin'"
|
||||
class="date arrival"
|
||||
@@ -79,6 +85,12 @@ export default defineComponent({
|
||||
type: Object as PropType<TrainScheduleStop>,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
sceneryHref() {
|
||||
return `/scenery?station=${this.stop.sceneryName}&checkpoint=${this.stop.nameRaw}`;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user