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",
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/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/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;
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');
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: {