mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Przekierowanie do dziennika historii scenerii
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<div class="journal-section">
|
||||
<keep-alive>
|
||||
<JournalTimetables v-if="journalTypeChosen == 'timetables'" />
|
||||
<JournalDispatchers v-else-if="journalTypeChosen == 'dispatchers'" />
|
||||
<JournalDispatchers v-else-if="journalTypeChosen == 'dispatchers'" :searchedSceneryName="$route.query.sceneryName?.toString()" />
|
||||
</keep-alive>
|
||||
</div>
|
||||
</section>
|
||||
@@ -46,6 +46,13 @@ export default defineComponent({
|
||||
this.journalTypeChosen = type;
|
||||
},
|
||||
},
|
||||
|
||||
activated() {
|
||||
const query = this.$route.query;
|
||||
console.log(this.$route.query);
|
||||
|
||||
if(query.sceneryName) this.journalTypeChosen = 'dispatchers';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -18,13 +18,18 @@
|
||||
<img :src="icons.back" alt="Back to scenery" />
|
||||
</button>
|
||||
|
||||
<!-- <button
|
||||
v-if="!timetableOnly && currentRegion.id == 'eu'"
|
||||
<button
|
||||
v-if="!timetableOnly && currentRegion.id == 'eu' && stationInfo"
|
||||
class="history-btn btn btn--image"
|
||||
@click="navigateTo('/journal')"
|
||||
@click="
|
||||
navigateTo('/journal', {
|
||||
view: 'dispatchers',
|
||||
sceneryName: stationInfo?.name,
|
||||
})
|
||||
"
|
||||
>
|
||||
<img :src="viewMode == 'history' ? icons.user : icons.history" alt="icon" />
|
||||
</button> -->
|
||||
</button>
|
||||
|
||||
<SceneryHeader :station="stationInfo" />
|
||||
|
||||
@@ -106,8 +111,11 @@ export default defineComponent({
|
||||
this.viewMode = mode;
|
||||
},
|
||||
|
||||
navigateTo(path: string) {
|
||||
this.$router.push(path);
|
||||
navigateTo(path: string, query?: {}) {
|
||||
this.$router.push({
|
||||
path,
|
||||
query,
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user