From 95fe9d107209fbdee0a82feb4fd684c68632d768 Mon Sep 17 00:00:00 2001 From: Spythere Date: Wed, 26 Jan 2022 15:40:35 +0100 Subject: [PATCH] =?UTF-8?q?Poprawiono=20kolorystyk=C4=99=20w=20widoku=20hi?= =?UTF-8?q?storii=20rozk=C5=82ad=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/JournalView.vue | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/views/JournalView.vue b/src/views/JournalView.vue index eb470a2..08597e0 100644 --- a/src/views/JournalView.vue +++ b/src/views/JournalView.vue @@ -30,8 +30,14 @@ {{ item.route.replace('|', ' - ') }} -
- {{ item.sceneriesString.replaceAll('%', ' - ') }} +
+ + {{ i > 0 ? ' - ' : '' }} {{ scenery.name }} +
@@ -46,7 +52,7 @@ {{ !item.terminated ? $t('history.timetable-active') - : (item.fulfilled || item.currentDistance >= item.routeDistance * 0.9) + : item.fulfilled || item.currentDistance >= item.routeDistance * 0.9 ? $t('history.timetable-fulfilled') : $t('history.timetable-abandoned') }} @@ -215,6 +221,11 @@ export default defineComponent({ }, methods: { + sceneryList(historyItem: TimetableHistory) { + return historyItem.sceneriesString + .split('%') + .map((name, i) => ({ name, confirmed: i < historyItem.confirmedStopsCount })); + }, navigateToTrain(trainNo: number | null) { if (!trainNo) return; @@ -252,11 +263,10 @@ export default defineComponent({ if (props.searchedTrain) queries.push(`train=${props.searchedTrain}`); // Z API: const SORT_TYPES = ['allStopsCount', 'endDate', 'beginDate', 'routeDistance']; - if (this.sorterActive.id == 'distance') queries.push("sortBy=routeDistance"); - else if (this.sorterActive.id == 'total-stops') queries.push("sortBy=allStopsCount"); + if (this.sorterActive.id == 'distance') queries.push('sortBy=routeDistance'); + else if (this.sorterActive.id == 'total-stops') queries.push('sortBy=allStopsCount'); console.log(queries); - try { const responseData: APIResponse | null = await (await axios.get(`${API_URL}?${queries.join('&')}`)).data; @@ -326,6 +336,16 @@ export default defineComponent({ justify-content: space-between; padding: 0.2em 0; + + .scenery-list { + span { + color: #adadad; + + &.confirmed { + color: rgb(163, 235, 163); + } + } + } } &-status {