From 272c9f50f8947452cd394ac576dfd969957eaf47 Mon Sep 17 00:00:00 2001 From: Spythere Date: Fri, 30 Dec 2022 15:45:17 +0100 Subject: [PATCH 1/4] fix: SW cache --- vite.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 05ca9f9..d76787a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -12,7 +12,7 @@ export default defineConfig({ registerType: 'prompt', workbox: { - globPatterns: ['**/*.{js,css,html,png,svg,img}'], + globPatterns: ['**/*.{js,css,html,png,svg,jpg}'], runtimeCaching: [ { urlPattern: new RegExp('^https://spythere.pl/api/getSceneries', 'i'), @@ -20,6 +20,7 @@ export default defineConfig({ options: { cacheName: 'sceneries-cache', expiration: { + maxEntries: 1, maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days }, cacheableResponse: { From 7e253278321ab29ad012c5767c448031089007d5 Mon Sep 17 00:00:00 2001 From: Spythere Date: Fri, 30 Dec 2022 17:39:21 +0100 Subject: [PATCH 2/4] =?UTF-8?q?feature:=20lvl=20dy=C5=BCurnego=20w=20dzien?= =?UTF-8?q?niku?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JournalView/JournalDispatchersList.vue | 23 ++++++++++++++++++- .../interfaces/api/DispatchersAPIData.ts | 2 ++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/components/JournalView/JournalDispatchersList.vue b/src/components/JournalView/JournalDispatchersList.vue index cb90d1a..0f1fb42 100644 --- a/src/components/JournalView/JournalDispatchersList.vue +++ b/src/components/JournalView/JournalDispatchersList.vue @@ -15,6 +15,14 @@ tabindex="0" > + + {{ item.dispatcherLevel >= 2 ? item.dispatcherLevel : 'L' }} + + {{ item.dispatcherName }}{{ item.stationName }}  #{{ item.stationHash }}  PL1 @@ -44,6 +52,7 @@ import { defineComponent, PropType } from 'vue'; import dateMixin from '../../mixins/dateMixin'; import { DispatcherHistory } from '../../scripts/interfaces/api/DispatchersAPIData'; +import styleMixin from '../../mixins/styleMixin'; export default defineComponent({ props: { @@ -53,7 +62,7 @@ export default defineComponent({ }, }, - mixins: [dateMixin], + mixins: [dateMixin, styleMixin], computed: { computedDispatcherHistory() { @@ -143,6 +152,18 @@ li.sticky { } } +.dispatcher-level { + display: inline-block; + text-align: center; + line-height: 150%; + + width: 25px; + height: 25px; + + margin-right: 0.5em; + border-radius: 0.25em; +} + @include smallScreen() { .journal_item { flex-direction: column; diff --git a/src/scripts/interfaces/api/DispatchersAPIData.ts b/src/scripts/interfaces/api/DispatchersAPIData.ts index 9a343ec..434f754 100644 --- a/src/scripts/interfaces/api/DispatchersAPIData.ts +++ b/src/scripts/interfaces/api/DispatchersAPIData.ts @@ -4,6 +4,8 @@ export interface DispatcherHistory { currentDuration: number; dispatcherId: number; dispatcherName: string; + dispatcherLevel: number | null; + dispatcherIsSupporter: boolean; isOnline: boolean; lastOnlineTimestamp: number; region: string; From 496ff95236ca53631fcf84d79af5491cad64cb4a Mon Sep 17 00:00:00 2001 From: Spythere Date: Sat, 31 Dec 2022 18:21:32 +0100 Subject: [PATCH 3/4] fix: sortowanie RJ wg id z API --- src/components/JournalView/JournalTimetablesList.vue | 2 +- src/scripts/interfaces/api/TimetablesAPIData.ts | 2 ++ src/views/JournalTimetables.vue | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/JournalView/JournalTimetablesList.vue b/src/components/JournalView/JournalTimetablesList.vue index a66f569..ee08f29 100644 --- a/src/components/JournalView/JournalTimetablesList.vue +++ b/src/components/JournalView/JournalTimetablesList.vue @@ -16,7 +16,7 @@ {{ timetable.trainCategoryCode }}  {{ timetable.trainNo }} | {{ timetable.driverName }} | - #{{ timetable.timetableId }} + #{{ timetable.id }} diff --git a/src/scripts/interfaces/api/TimetablesAPIData.ts b/src/scripts/interfaces/api/TimetablesAPIData.ts index 7100024..c64ebfc 100644 --- a/src/scripts/interfaces/api/TimetablesAPIData.ts +++ b/src/scripts/interfaces/api/TimetablesAPIData.ts @@ -1,4 +1,6 @@ export interface TimetableHistory { + id: number; + timetableId: number; trainNo: number; trainCategoryCode: string; diff --git a/src/views/JournalTimetables.vue b/src/views/JournalTimetables.vue index 9e69513..103f2cb 100644 --- a/src/views/JournalTimetables.vue +++ b/src/views/JournalTimetables.vue @@ -234,7 +234,7 @@ export default defineComponent({ if (this.sorterActive.id == 'distance') queries.push('sortBy=routeDistance'); else if (this.sorterActive.id == 'total-stops') queries.push('sortBy=allStopsCount'); else if (this.sorterActive.id == 'beginDate') queries.push('sortBy=beginDate'); - else queries.push('sortBy=timetableId'); + // else queries.push('sortBy=timetableId'); queries.push('countLimit=15'); From 75685c1e0e3a00ed02edcd3df7e7481864a4da2d Mon Sep 17 00:00:00 2001 From: Spythere Date: Sat, 31 Dec 2022 18:22:39 +0100 Subject: [PATCH 4/4] bump: 1.11.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a3179cb..e444ffc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stacjownik", - "version": "1.11.0", + "version": "1.11.1", "private": true, "scripts": { "dev": "vite",