- |
+ |
{{
(row.scheduledArrivalDate?.getTime() || 0) != (row.scheduledDepartureDate?.getTime() || 0)
? row.scheduledArrivalDate?.toLocaleTimeString('pl-PL', { hour: '2-digit', minute: '2-digit' })
@@ -111,7 +111,7 @@
| {{ row.driveTime ? Math.floor(row.driveTime / 60000) : '' }} |
- |
+ |
{{ row.scheduledDepartureDate?.toLocaleTimeString('pl-PL', { hour: '2-digit', minute: '2-digit' }) }}
|
{{ row.stopTime || '' }} |
@@ -121,13 +121,13 @@
-
+ |
-
+
| {{ row.headLocos[0] }} |
-
+
| {{ row.headLocos[1] ?? ' ' }} |
@@ -137,11 +137,11 @@
|
-
+ |
-
+
| {{ row.stockMass }} |
@@ -152,7 +152,7 @@
- | {{ row.stockVmax }} |
+ {{ row.stockVmax }} |
@@ -183,5 +183,10 @@ defineProps({
thead {
display: table-header-group;
}
+
+ tr,
+ td {
+ border-color: theme('colors.black');
+ }
}
diff --git a/src/components/Timetable/TimetableHeader.vue b/src/components/Timetable/TimetableHeader.vue
index 3c5151d..ce984bf 100644
--- a/src/components/Timetable/TimetableHeader.vue
+++ b/src/components/Timetable/TimetableHeader.vue
@@ -1,19 +1,19 @@
- Nr linii |
- Km |
- VP |
- VL |
- Stacja |
- Godzina |
-
+ | Nr linii |
+ Km |
+ VP |
+ VL |
+ Stacja |
+ Godzina |
+
-
+
| Lok I |
-
+
| Lok II |
@@ -22,11 +22,11 @@
|
-
+ |
-
+
| Obc. lok. |
@@ -36,7 +36,15 @@
|
- Vmax |
+ Vmax |
+
+
diff --git a/src/components/Timetable/TimetableSelect.vue b/src/components/Timetable/TimetableSelect.vue
index 3b4d399..8647b3c 100644
--- a/src/components/Timetable/TimetableSelect.vue
+++ b/src/components/Timetable/TimetableSelect.vue
@@ -14,6 +14,11 @@
+
+
@@ -30,7 +35,7 @@ import { ref, type Ref } from 'vue';
import { useApiStore } from '../../stores/api.store';
import { DataStatus } from '../../types/api.types';
import { useGlobalStore } from '../../stores/global.store';
-import { PrinterIcon, ArrowPathIcon } from '@heroicons/vue/16/solid';
+import { PrinterIcon, ArrowPathIcon, MoonIcon, SunIcon } from '@heroicons/vue/16/solid';
import { getRegionNameById } from '../../utils/trainUtils';
// Stores
@@ -51,12 +56,20 @@ function selectTrain() {
}
}
+function toggleDarkMode() {
+ globalStore.darkMode = !globalStore.darkMode;
+
+ window.localStorage.setItem('currentTheme', globalStore.darkMode ? 'dark' : 'light');
+}
+
function openPrintingWindow() {
if (globalStore.selectedTrain != null) {
- const date = `${globalStore.generatedDate!.toLocaleDateString('pl-PL').replace(/\./g, '-')}--${globalStore.generatedDate!.toLocaleTimeString('pl-PL').replace(/:/g, '-')}`;
+ const date = `${globalStore.generatedDate!.toLocaleDateString('pl-PL').replace(/\./g, '-')}--${globalStore
+ .generatedDate!.toLocaleTimeString('pl-PL')
+ .replace(/:/g, '-')}`;
document.title = `${globalStore.selectedTrain.driverName} ; ${globalStore.selectedTrain.timetable!.category} ${globalStore.selectedTrain.trainNo}
- ${globalStore.selectedTrain.timetable?.route.replace('|', ' - ')} ; ${date}`;
+ ${globalStore.selectedTrain.timetable?.route.replace('|', ' - ')} ; ${date}`;
}
window.print();
diff --git a/src/components/Timetable/TrainTimetable.vue b/src/components/Timetable/TrainTimetable.vue
index 414b3eb..d8f777d 100644
--- a/src/components/Timetable/TrainTimetable.vue
+++ b/src/components/Timetable/TrainTimetable.vue
@@ -1,14 +1,20 @@
-
-
- {{ globalStore.selectedTrain.timetable!.category }} {{ globalStore.selectedTrain.trainNo }} Relacja
- {{ globalStore.selectedTrain.timetable?.route.replace('|', ' - ') }}
-
+
+
+
+ {{ globalStore.selectedTrain.timetable!.category }} {{ globalStore.selectedTrain.trainNo }} Relacja
+ {{ globalStore.selectedTrain.timetable?.route.replace('|', ' - ') }}
+
-
+
+
Wybierz aktywny pociąg, aby wygenerować SRJP
diff --git a/src/stores/global.store.ts b/src/stores/global.store.ts
index c5f6400..87d6242 100644
--- a/src/stores/global.store.ts
+++ b/src/stores/global.store.ts
@@ -4,9 +4,9 @@ import type { ActiveTrain } from '../types/common.types';
export const useGlobalStore = defineStore('global', {
state: () => ({
+ darkMode: false,
+
selectedTrain: null as ActiveTrain | null,
-
-
generatedDate: null as Date | null,
generatedMs: 0,
}),
diff --git a/src/style.css b/src/style.css
index 0fbccfd..05f05d7 100644
--- a/src/style.css
+++ b/src/style.css
@@ -2,10 +2,6 @@
@tailwind components;
@tailwind utilities;
-:root {
- color-scheme: dark;
-}
-
body {
margin: 0;
}
@@ -24,7 +20,6 @@ body {
/* Track */
::-webkit-scrollbar-track {
background: theme('colors.stone.900');
- border-radius: theme('borderRadius.md');
}
/* Handle */
diff --git a/tailwind.config.js b/tailwind.config.js
index 0066cd3..355992f 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -4,6 +4,7 @@ export default {
theme: {
extend: {},
},
+ darkMode: 'selector',
plugins: [],
purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
}
|