Compare commits

...

259 Commits

Author SHA1 Message Date
Spythere 44df685606 Merge pull request #92 from Spythere/development
v1.24.4
2024-05-30 14:38:04 +02:00
Spythere 785a42b849 hotfix: detecting user timetable status at checkpoints 2024-05-30 14:29:09 +02:00
Spythere ccfcca8728 hotfix: scenery timetable duplicating 2024-05-30 14:24:18 +02:00
Spythere d9a7ba122c Merge pull request #91 from Spythere/development
v1.24.3
2024-05-26 01:44:45 +02:00
Spythere bf8d4a9ef4 chore: global font sizing; chore: train modal dvh 2024-05-25 18:06:01 +02:00
Spythere 6ea1e91d1d hotfix: card positioning 2024-05-25 17:57:25 +02:00
Spythere 813b557455 chore: improved card positioning 2024-05-25 17:55:18 +02:00
Spythere 834b14da69 fix: card dvh 2024-05-25 17:26:27 +02:00
Spythere c809b2146d chore: locale update 2024-05-25 17:12:19 +02:00
Spythere 33b98ca313 chore: added text color for active filters info 2024-05-25 17:11:28 +02:00
Spythere bcb9c63cb0 chore: reactive hiding body scroll on modal 2024-05-25 17:05:41 +02:00
Spythere 17d77a80d8 bump: 1.24.3 2024-05-25 16:02:40 +02:00
Spythere 65b159f8fd fix: scenery timetable duplicates; fix: not opening train modal for queries 2024-05-25 16:02:20 +02:00
Spythere 063d5283e4 Merge pull request #90 from Spythere/development
v1.24.2
2024-05-24 13:56:39 +02:00
Spythere 29de1b3c4b chore: scenery view layout 2024-05-24 13:52:42 +02:00
Spythere f0c02bf12e chore: pwa adjustments 2024-05-24 13:43:29 +02:00
Spythere 8aa23468b3 chore: changed station stats median to avg 2024-05-23 15:53:18 +02:00
Spythere 4c1fcf710b refactor: global modals to cards 2024-05-23 15:01:30 +02:00
Spythere a529d6e9eb chore: changed no stations message 2024-05-23 14:08:42 +02:00
Spythere 9fc602e08f chore: filters improvements 2024-05-22 15:41:33 +02:00
Spythere 56e40bd84b bump: version (1.24.2) 2024-05-21 16:17:41 +02:00
Spythere a5b5df7452 refactor: restructured station filters 2024-05-21 16:17:23 +02:00
Spythere 1a8da02ced chore: checkpoints detection fix 2024-05-19 23:42:06 +02:00
Spythere 7e75fa2516 chore: checkpoints hotfix 2024-05-19 23:12:07 +02:00
Spythere 3ed2c09184 chore: checkpoints filtering 2024-05-19 23:05:57 +02:00
Spythere 6901c3d2b4 chore: hotfix 2024-05-19 22:30:21 +02:00
Spythere 8417754403 refactor: optimization of train schedules 2024-05-19 19:50:01 +02:00
Spythere de5c57181a Merge pull request #89 from Spythere/development
v1.24.1
2024-05-16 23:43:39 +02:00
Spythere d91d4cc6a8 fix: station stats spawn count regions 2024-05-16 23:42:35 +02:00
Spythere 9a5fd4d670 chore: version bump 2024-05-16 23:29:56 +02:00
Spythere 4202a55673 chore: updated pwa strategies 2024-05-16 21:36:16 +02:00
Spythere 5181e8f4af chore: fix journal refresh date visibility 2024-05-16 20:06:02 +02:00
Spythere e117f62fcb chore: added station filters (scenery types); pwa adjustments 2024-05-16 19:59:43 +02:00
Spythere e0036bf969 chore: filters & stats fixes 2024-05-15 18:40:42 +02:00
Spythere 1f457d6389 Merge pull request #88 from Spythere/development
hotfix: minor adjustments for new simulator version (2024.1.1)
2024-05-13 15:05:28 +02:00
Spythere eb5b94c9f6 chore: vehicle images hotfixes 2024-05-13 15:02:15 +02:00
Spythere 328e8c0573 chore: fixed stock fallback thumbnnail 2024-05-13 14:54:21 +02:00
Spythere 9f58ae5428 Merge pull request #87 from Spythere/development
hotfix: modal positioning
2024-05-12 15:23:30 +02:00
Spythere ebd0eeb8c4 hotfix: modal positioning 2024-05-12 15:22:03 +02:00
Spythere fa656c2f26 Merge pull request #86 from Spythere/development
v1.24.0
2024-05-12 15:14:22 +02:00
Spythere 0cc3a12d1d fix: modal responsiveness 2024-05-12 14:55:35 +02:00
Spythere 392a6437f8 feature: current users tooltip 2024-05-09 17:19:22 +02:00
Spythere 122532f0ed chore: general fixes 2024-05-09 16:40:53 +02:00
Spythere 366ff91f60 hotfix: update modal 2024-05-08 20:12:07 +02:00
Spythere a0496736dd chore: modals update 2024-05-08 20:04:41 +02:00
Spythere f974120e87 fix: lock files 2024-05-08 18:42:33 +02:00
Spythere abd8b8178b chore: vue deep selector 2024-05-08 16:42:04 +02:00
Spythere f1fcde8459 feat: update modal 2024-05-08 16:41:14 +02:00
Spythere b3289d6aab chore: region dropdown fixes 2024-05-08 15:16:20 +02:00
Spythere 6481a4a3b0 chore: design improvements 2024-05-08 15:10:40 +02:00
Spythere 05dc268526 fix: spawns detection 2024-05-06 18:18:15 +02:00
Spythere 669acc98d2 chore: station stats translation 2024-05-06 18:16:30 +02:00
Spythere 3371b661c2 fix: ufactor calc 2024-05-06 17:53:07 +02:00
Spythere 871b2c0221 feature: open spawns tooltip 2024-05-06 17:36:23 +02:00
Spythere d366a877a4 refactor: popups -> tooltips 2024-05-06 16:37:56 +02:00
Spythere 405aab96bd feature: stations stats 2024-05-05 13:34:43 +02:00
Spythere f29c160000 fix: lock files 2024-05-04 14:47:30 +02:00
Spythere a2de0e2030 refactor: types & performance 2024-05-04 14:43:34 +02:00
Spythere 7dd1c06f3f chore: accessibility of filters 2024-05-03 19:29:10 +02:00
Spythere ff041b9aaf bump(version): 1.24.0 2024-05-03 19:02:49 +02:00
Spythere 4782dba444 feat(app): added min route speed & max route speed station filters 2024-05-03 19:02:16 +02:00
Spythere d6b8d032d6 fix(app): improved data fetching scheduler 2024-05-03 19:02:13 +02:00
Spythere c16616330c chore(packages): update & cleanup 2024-05-03 18:01:54 +02:00
Spythere 57cec8bfe7 chore: pwa adjustments 2024-05-03 17:49:54 +02:00
Spythere 6bea340e19 chore(pwa): changed sceneries cache to cachefirst 2024-05-01 19:37:51 +02:00
Spythere c181cf7e64 fix(workflows): release color 2024-04-27 01:11:38 +02:00
Spythere 8e4ae64cd3 chore(workflows): added release discord webhook notification 2024-04-15 15:13:22 +02:00
Spythere 5750490f01 refactor: journals 2024-04-08 23:21:50 +02:00
Spythere 3ef27e1d69 Merge pull request #85 from Spythere/development
Wersja 1.23.1
2024-04-01 13:00:28 +02:00
Spythere f53993c717 hotfix 2024-03-31 21:55:33 +02:00
Spythere 235c16e30f train modal 2024-03-31 21:37:14 +02:00
Spythere c3533f07ad literówka 2024-03-30 17:48:34 +01:00
Spythere d05579c5ee popupy 2024-03-30 13:24:39 +01:00
Spythere c8f53c2f06 hotfixy designu 2024-03-30 00:18:54 +01:00
Spythere b44f88ebcd src miniaturek 2024-03-29 23:37:26 +01:00
Spythere 7805d1350c responsywność 2024-03-29 23:35:56 +01:00
Spythere b17bd19433 zmiana położenia przycisku RJ ONLINE w dzienniku 2024-03-29 23:23:14 +01:00
Spythere c12a6cbacd zmiana rozłożenia elementów w modalu aktywnego pociągu 2024-03-29 23:21:15 +01:00
Spythere ba650238db poprawki rozmieszczenia popupu 2024-03-29 23:04:08 +01:00
Spythere d5ec9919e2 update modal (wip) 2024-03-29 20:34:56 +01:00
Spythere 20cd393e05 Merge pull request #84 from Spythere/development
Wersja 1.23.0
2024-03-24 01:30:03 +01:00
Spythere 31e65c09d6 hotfix: podgląd pojazdów 2024-03-24 00:05:39 +01:00
Spythere fb2348e774 hotfixy designu 2024-03-23 23:55:18 +01:00
Spythere 1ec75bda70 poprawki do popupów 2024-03-23 16:47:57 +01:00
Spythere 6b6b837dde bump: v1.23.0 2024-03-23 00:01:15 +01:00
Spythere 66a02d76bd dodano odnośnik do dziennika RJ maszynisty 2024-03-23 00:00:52 +01:00
Spythere c7162dbd14 dodano dymki kontekstowe oraz podgląd pojazdu 2024-03-22 23:41:43 +01:00
Spythere 1cfe073bab Merge pull request #83 from Spythere/development
Wersja 1.22.3
2024-03-17 18:38:27 +01:00
Spythere e3b72c81ea bump: 1.22.3 2024-03-17 18:37:58 +01:00
Spythere 5552995564 fix: duplikujące się aktywne RJ scenerii 2024-03-17 18:37:45 +01:00
Spythere 623d5dd2ce fix: RJ scenerii offline 2024-03-17 17:33:19 +01:00
Spythere 6992b998a8 Merge pull request #82 from Spythere/development
Wersja 1.22.2
2024-03-17 16:47:52 +01:00
Spythere 669975c68e hotfixy 2024-03-17 16:42:35 +01:00
Spythere 084823de44 fix pobierania danych 2024-03-16 22:13:38 +01:00
Spythere f62d6982e5 Merge pull request #81 from Spythere/development
Wersja 1.22.1
2024-03-12 16:51:26 +01:00
Spythere 1c9b54b578 bump: 1.22.1 2024-03-11 23:50:00 +01:00
Spythere 0f4e5ee5f3 fix: niepoprawne miniaturki pojazdów 2024-03-11 23:49:45 +01:00
Spythere 29b5e715fa hotfixy wyglądu 2024-03-11 23:43:10 +01:00
Spythere 91a18b51a0 Merge pull request #80 from Spythere/development
Wersja 1.22.0
2024-03-06 22:49:46 +01:00
Spythere 241648ec49 asdek: filtry 2024-03-06 18:33:30 +01:00
Spythere ed7d93e7fc fixy filtrowania; ogólne 2024-03-06 18:12:20 +01:00
Spythere 436e3e63f9 hotfixy 2024-03-05 15:27:42 +01:00
Spythere 17ebdace82 fix filtrowania ocenami 2024-03-04 21:13:12 +01:00
Spythere 20826d905d poprawki tłumaczeń 2024-03-04 21:10:43 +01:00
Spythere 41b1ab398c bump: 1.22.0 2024-03-04 20:32:05 +01:00
Spythere 03465a1487 poprawki 2024-03-04 20:31:54 +01:00
Spythere a19fdbc19d hotfix 2024-03-04 18:18:37 +01:00
Spythere 032f82acd2 animacje statusów listy scenerii; fixy tłumaczeń 2024-03-04 18:06:47 +01:00
Spythere b4a9d4ca3b brakujące tłumaczenia 2024-03-04 17:50:45 +01:00
Spythere 986c7ba95e asdek 2024-03-04 17:46:09 +01:00
Spythere 17f6f9c8ef poprawki designu scenerii 2024-03-03 22:17:15 +01:00
Spythere 40bbdbe4fa sortowanie po liczbie szlaków i ocenie dyżurnego 2024-03-03 21:44:39 +01:00
Spythere 9f5d882119 poprawki tabelki scenerii 2024-03-03 20:30:05 +01:00
Spythere 6f45663c6c design stock listy 2024-03-03 19:04:17 +01:00
Spythere a7861b361d design statystyk pociągu 2024-03-03 15:10:29 +01:00
Spythere 5f8d7480d1 fix designu 2024-03-03 14:46:37 +01:00
Spythere e222dc63eb scroller sponsorów projektu w modalu 2024-03-03 14:31:04 +01:00
Spythere 9c2f0ac797 bump: 1.21.1 2024-03-02 23:21:13 +01:00
Spythere e33ba4af90 design szlaków na liście scenerii 2024-03-02 23:16:17 +01:00
Spythere 7b868a9f28 brakujące tłumaczenia 2024-03-02 22:38:53 +01:00
Spythere 2a18ba4368 poprawki szerokości 2024-03-02 22:19:41 +01:00
Spythere fcbd6d0883 migracja http clienta do apiStore 2024-03-02 16:13:33 +01:00
Spythere 20fc4aba5b padding scrollbaru 2024-03-01 19:12:23 +01:00
Spythere 76ca0d1786 cleanup kodu 2024-03-01 19:07:21 +01:00
Spythere 7e3c150815 usprawnienia miniaturek pojazdów 2024-03-01 19:07:00 +01:00
Spythere c8d56ec442 vite config dev 2024-02-29 13:31:48 +01:00
Spythere 5c4c486643 Wersja 1.21.0
Wersja 1.21.0
2024-02-12 15:14:50 +01:00
Spythere 755c729a9b brakujące tłumaczenia; poprawki 2024-02-12 14:58:59 +01:00
Spythere 3ac8d60c5c filtry aktywnych RJ 2024-02-11 15:30:19 +01:00
Spythere dcff3b088f poprawki filtrowania statusów 2024-02-10 23:11:13 +01:00
Spythere 90b2099955 checkpointy; hotfixy 2024-02-10 22:42:35 +01:00
Spythere fc0c04ec9d bump: 1.21.0 2024-02-10 01:31:08 +01:00
Spythere 41b335555a wyświetlanie RJ dla scenerii offline 2024-02-10 01:30:43 +01:00
Spythere 60f7b3bbb5 Wersja 1.20.5
Wersja 1.20.5
2024-02-03 14:36:57 +01:00
Spythere eaefe955a7 bump: 1.20.5 2024-02-02 21:14:29 +01:00
Spythere edaa4f2684 cleanup 2024-02-02 21:14:16 +01:00
Spythere 30fce3787b usprawnienia pobierania danych; statusy SWDR na semaforze 2024-02-02 21:13:21 +01:00
Spythere 4716f1c7a4 Wersja 1.20.4
Wersja 1.20.4
2024-01-30 16:44:55 +01:00
Spythere bb7ccf98fd bump wersji 2024-01-30 16:41:27 +01:00
Spythere c06d75b981 lock fix; linting 2024-01-30 14:00:38 +01:00
Spythere c7da8477fa przywrócenie komunikacji po WS (test) 2024-01-30 13:58:47 +01:00
Spythere e43f1e0819 Wersja 1.20.3
Wersja 1.20.3
2024-01-26 13:59:23 +01:00
Spythere f130e6900b hotfix: brak komentarzy dla ostatniej stacji w RJ 2024-01-26 13:54:47 +01:00
Spythere db205915be bump wersji 2024-01-26 13:39:04 +01:00
Spythere 05c38e10e3 hotfix postojów pt w SRJP 2024-01-26 13:38:45 +01:00
Spythere a8f683a585 mock data 2024-01-26 13:38:28 +01:00
Spythere 68f6fc8a42 Wersja 1.20.2
Wersja 1.20.2
2024-01-24 20:37:35 +01:00
Spythere 6d3b32cd7d bump: 1.20.2 2024-01-24 20:35:49 +01:00
Spythere fadecc9d2c fix literówki w tłumaczeniu 2024-01-24 20:35:15 +01:00
Spythere 50602cb6db Merge pull request #74 from Spythere/development
- rozbudowany szczegółówy RJ pociągu
- hotfixy do pobierania danych z API
2024-01-13 17:54:17 +01:00
Spythere 186ce81819 hotfix: filtrowanie aktywnych rj do odpowiednich regionów 2024-01-13 17:28:16 +01:00
Spythere f836a075b0 hotfix: pobieranie historii RJ nieznanych scenerii 2024-01-13 15:41:40 +01:00
Spythere 9acf3c740c dodano wybór z listy autorów w filtrach 2024-01-06 17:40:43 +01:00
Spythere bc1c1bd3d2 filtrowanie ukrytych szlaków 2024-01-06 14:47:20 +01:00
Spythere 2348277b95 poprawki do SRJP 2024-01-06 14:10:59 +01:00
Spythere cd5f489df7 bump wersji: 1.20.1 2024-01-06 14:06:50 +01:00
Spythere f74962222b przywrócenie SRJP bez pokazywania dod. informacji 2024-01-06 14:05:40 +01:00
Spythere e7f651d2b9 poprawki ułożenia elementów progress bara SRJP, elektryfikacja szlaku 2024-01-02 15:44:48 +01:00
Spythere 4862328090 rozbudowany szczegółówy RJ pociągu 2024-01-01 22:49:19 +01:00
Spythere 87631d1f74 Merge pull request #73 from Spythere/development
Wersja 1.20
2023-12-23 14:08:08 +01:00
Spythere 86bb9fcc2e hotfix redirectu do zakładki dziennika 2023-12-22 16:39:42 +01:00
Spythere b85e3bfe1d ukryto ikonę pragotronu 2023-12-22 16:16:19 +01:00
Spythere dd15072813 linting 2023-12-22 16:13:45 +01:00
Spythere 2f8376c996 dodane nowe statystyki dnia; poprawki bugów 2023-12-22 15:46:47 +01:00
Spythere 514723cf74 poprawki typów; ułożenie elementów w karcie filtrów scenerii 2023-12-21 22:16:03 +01:00
Spythere 0995ce15bc poprawki filtrów dziennia DR 2023-12-21 22:11:06 +01:00
Spythere 3b3c3bda31 poprawki wskaźników ładowania 2023-12-21 19:53:34 +01:00
Spythere 2027b85450 lokalne fonty; poprawki offline i cachingu pwa 2023-12-21 19:27:27 +01:00
Spythere 0c6b55146f bump: 1.20.0 2023-12-20 23:56:18 +01:00
Spythere 3c728e3cfa poprawki requestów statystyk; organizacja kodu 2023-12-20 23:55:42 +01:00
Spythere adce339392 statystyki dr (c.d.) + tłumaczenia 2023-12-19 22:11:17 +01:00
Spythere 00a4a840b0 statystyki DR 2023-12-18 16:00:18 +01:00
Spythere 1e705ea496 filtry URL dziennika DR 2023-12-17 19:51:52 +01:00
Spythere e8ed36df16 reaktywne filtry URL w dzienniku RJ 2023-12-17 16:10:13 +01:00
Spythere f4be32aa39 Statystyki DR (wip) 2023-12-16 17:49:54 +01:00
Spythere e0d3d2585d zmiana wyglądu statystyk dzienników 2023-12-14 18:42:13 +01:00
Spythere ebfaf06a44 Merge pull request #72 from Spythere/development
Wersja 1.19.4
2023-12-11 13:02:05 +01:00
Spythere 5a651aedf8 imports hotfix 2023-12-11 12:58:41 +01:00
Spythere b66af014b9 lock sync 2023-12-10 15:29:29 +01:00
Spythere 634c9e1514 bump wersji: 1.19.4 2023-12-10 15:23:54 +01:00
Spythere c4132a9be2 cleanup http c.d. 2023-12-10 15:23:27 +01:00
Spythere 82a9a9165f cleanup http 2023-12-10 15:22:33 +01:00
Spythere fcac03c0a4 Merge pull request #71 from Spythere/development
Wersja 1.19.3
2023-12-10 00:56:21 +01:00
Spythere 39c3cf2329 restrukturyzacja storów 2023-12-09 16:18:23 +01:00
Spythere 59f4a0cb66 zmniejszenie czasu odpytywania z serwera 2023-12-08 20:00:17 +01:00
Spythere e2b42d16a4 poprawki scrollBehavior 2023-12-08 18:55:06 +01:00
Spythere e23663ed28 fix: brak ładowania danych o historii scenerii przy bezpośrednim wejściu z poz. URL 2023-12-08 18:15:49 +01:00
Spythere dc7846c31e bump wersji: 1.19.3 2023-12-08 17:15:16 +01:00
Spythere d875433d56 ulepszone zapamiętywanie zakładek statystyk w dzienniku 2023-12-08 17:14:49 +01:00
Spythere 71e5044cb4 poprawki designu dziennika RJ 2023-12-08 16:20:17 +01:00
Spythere e83aa40f82 aktualizacja endpointu API statystyk 2023-12-08 16:16:14 +01:00
Spythere d1c0e0b898 Merge pull request #70 from Spythere/development
Wersja 1.19.2
2023-12-07 16:29:53 +01:00
Spythere 26a7c69886 bump: 1.19.2 2023-12-07 16:18:21 +01:00
Spythere 0dc2c505db poprawki do braku pokazywania się niezapisanych scenerii 2023-12-07 16:16:06 +01:00
Spythere 188857d335 fix: rozkłady jazdy pokazują się na innych serwerach 2023-12-06 20:29:28 +01:00
Spythere 3dbbb3b4f9 Merge pull request #69 from Spythere/development
Wersja 1.19.1
2023-12-02 23:04:55 +01:00
Spythere 07a77c463b bump 1.19.1 2023-12-02 23:04:24 +01:00
Spythere 1a8e2231dd przejście z WS na komunikację http 2023-12-02 23:02:08 +01:00
Spythere f630d272ca Merge pull request #68 from Spythere/development
Wersja 1.19.0
2023-12-02 18:31:58 +01:00
Spythere a381cf806c wyróżnienie nicku donatora w widoku scenerii 2023-12-02 18:15:52 +01:00
Spythere 0023ab8cfd tłumaczenia; poprawki dropdown 2023-12-02 18:01:01 +01:00
Spythere a392940d52 tłumaczenia 2023-12-02 16:15:37 +01:00
Spythere 74984ad653 dodano wyróżnienie nicku wspierającego w Dzienniku 2023-12-02 16:11:29 +01:00
Spythere a8991434bc tłumaczenia statystyk pociągów 2023-12-02 16:00:28 +01:00
Spythere 825610b4c2 hotfix; aktualizacja paczek 2023-12-01 21:40:04 +01:00
Spythere fef3991206 bump: 1.19.0 2023-12-01 21:27:13 +01:00
Spythere a21cb31a0a ikona przy informacji offline pociągu 2023-12-01 21:26:57 +01:00
Spythere 23a954a0d1 statystyki ruchu online 2023-12-01 21:19:04 +01:00
Spythere b7bc9625b8 dodatkowe opcje darowizny 2023-12-01 16:11:56 +01:00
Spythere bc58196804 cleanup 2023-12-01 14:55:13 +01:00
Spythere 6550d6973e zmiana API do pobierania informacji o wspierających 2023-12-01 14:54:55 +01:00
Spythere d7a609a4f2 Merge pull request #67 from Spythere/development
poprawki tłumaczeń; scrolling
2023-11-28 19:12:57 +01:00
Spythere 763506d5a9 bump: 1.18.6 2023-11-28 19:10:08 +01:00
Spythere 8dbb32b821 dodatkowe tłumaczenia 2023-11-28 19:09:14 +01:00
Spythere b8a21e0f70 Merge pull request #66 from Spythere/development
hotfix: scrollowanie tabelki scenerii
2023-11-28 18:58:27 +01:00
Spythere 7c2b5fbd50 hotfix scrollowania 2023-11-28 18:56:02 +01:00
Spythere ac740c2743 Merge pull request #65 from Spythere/development
feature: darowizny + poprawki (wersja 1.18.5)
2023-11-28 18:44:44 +01:00
Spythere 916f19df72 poprawki tłumaczenia en 2023-11-28 18:38:42 +01:00
Spythere de8facfb05 bump: 1.18.5 2023-11-28 18:36:37 +01:00
Spythere 5d5ad44508 wielkość czcionki 2023-11-28 18:35:41 +01:00
Spythere 647055d2f0 ikona donatora w zakładce Pociągi; poprawki tłumaczeń 2023-11-28 18:33:40 +01:00
Spythere 1947555724 poprawki responsywności 2023-11-28 17:56:08 +01:00
Spythere 86417f3422 lock sync 2023-11-26 19:50:04 +01:00
Spythere a224b58d17 feature: modal darowizn 2023-11-26 19:49:32 +01:00
Spythere 69be01fb1e Merge pull request #64 - 1.18.4 fix
poprawki do 1.18.4
2023-11-17 16:55:09 +01:00
Spythere 6ef04f0dbd fix sortowania statusów dr; linting 2023-11-17 16:52:53 +01:00
Spythere 451d90f854 bump: 1.18.4 2023-11-15 21:09:30 +01:00
Spythere b01d3e894b Merge pull request #63 from Spythere/development
hotfix: statusy dr
2023-11-15 21:07:28 +01:00
Spythere 13dc6a0e32 hotfix: statusy dr 2023-11-15 21:06:16 +01:00
Spythere 96714550d0 Merge pull request #62 - Wersja 1.18.3
Wersja 1.18.3
2023-11-15 02:13:54 +01:00
Spythere 2b6c751f55 hotifx toString 2023-11-13 15:57:01 +01:00
Spythere 08d3a2a03a feature: nawigacja URL w widoku scenerii 2023-11-13 15:32:02 +01:00
Spythere a79ca78781 poprawki animacji statusów danych & tryb offline 2023-11-13 14:59:17 +01:00
Spythere e08333dba1 fix: tłumaczenie statusów dr 2023-11-12 16:40:25 +01:00
Spythere 8705dd1df5 fix filtrowania RJ na posterunkach; favicons index 2023-11-12 15:47:55 +01:00
Spythere 7b4da9d422 poprawki layoutu aplikacji 2023-11-10 16:18:06 +01:00
Spythere e51b2fe2f3 poprawki filtrów poc. 2023-11-10 15:39:49 +01:00
Spythere f8b4ce103f refactor typów danych 2023-11-10 15:04:49 +01:00
Spythere e82b4b8817 bump 1.18.3 2023-11-08 22:04:11 +01:00
Spythere 36e9df82b0 hotfixy 2023-11-08 22:03:45 +01:00
Spythere cbce9af00b nowe pobieranie i przetwarzanie statusów dyżurnych 2023-11-07 20:16:58 +01:00
Spythere 4a4304d65f Merge pull request #61 - Wersja 1.18.2
Wersja 1.18.2
2023-11-04 17:03:51 +01:00
Spythere edad5306f2 bump: 1.18.2 2023-11-04 17:01:01 +01:00
Spythere 5b775dfec9 fix: filtry RJ 2023-11-04 17:00:50 +01:00
Spythere a485652ca5 Merge pull request #60 (hotfix)
hotfix: maksymalny timeout dyżurnych (1.18.1)
2023-11-02 22:44:48 +01:00
Spythere ed308246d7 hotfix: maksymalny timeout dyżurnych 2023-11-02 22:42:28 +01:00
Spythere 621bb1ad55 Merge pull request #59 - Wersja 1.18.1
Wersja 1.18.1
2023-11-02 17:41:59 +01:00
Spythere 154ae2ddac bump 1.18.1 2023-11-02 17:40:55 +01:00
Spythere d9da49a867 rozszerzony wybór regionów przez URL; poprawki headerów 2023-11-02 17:40:31 +01:00
Spythere 826d51f66c Merge pull request #58 - Wersja 1.18
Wersja 1.18
2023-11-02 01:27:29 +01:00
Spythere 1d7fc2955f animacje userów i spawnów scenerii 2023-11-01 17:20:05 +01:00
Spythere c550e7598a bump 1.18.0 2023-10-31 23:03:51 +01:00
Spythere d5168ce59d lock sync 2023-10-31 22:54:53 +01:00
Spythere 380c97655c filtrowanie statusów; poprawki w statystykach 2023-10-31 22:53:18 +01:00
Spythere e4ed24de80 region query 2023-10-31 02:35:41 +01:00
Spythere 8de03b9210 rework reaktywności danych z API i WS 2023-10-30 23:19:17 +01:00
Spythere 12ece46089 migracja assetów 2023-10-04 17:30:30 +02:00
Spythere 085238fada hotfix: zapamiętywanie stanu statystyk 2023-10-04 15:32:36 +02:00
Spythere 45c1d83512 format & lint 2023-10-04 15:01:01 +02:00
242 changed files with 32963 additions and 37614 deletions
+18
View File
@@ -0,0 +1,18 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
rules: {
'vue/multi-word-component-names': 'off'
},
parserOptions: {
ecmaVersion: 'latest'
}
}
@@ -0,0 +1,17 @@
on:
release:
types: [published]
jobs:
github-releases-to-discord:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Github Releases To Discord
uses: SethCohen/github-releases-to-discord@v1.13.1
with:
webhook_url: ${{ secrets.WEBHOOK_URL }}
color: "15844367"
footer_title: "Changelog - Stacjownik"
footer_timestamp: true
+7
View File
@@ -0,0 +1,7 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
+21 -12
View File
@@ -1,11 +1,14 @@
<!DOCTYPE html> <!doctype html>
<html lang="pl"> <html lang="pl">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" /> <meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta name="keywords" content="Stacjownik, TD2, Train Driver 2, stacjownik-td2, stacjownik, td2.info.pl" /> <meta
name="keywords"
content="Stacjownik, TD2, Train Driver 2, stacjownik-td2, stacjownik, td2.info.pl"
/>
<meta name="description" content="Pomocnik maszynisty i dyżurnego symulatora Train Driver 2" /> <meta name="description" content="Pomocnik maszynisty i dyżurnego symulatora Train Driver 2" />
<title>Stacjownik</title> <title>Stacjownik</title>
@@ -18,10 +21,6 @@
<meta name="msapplication-TileColor" content="#da532c" /> <meta name="msapplication-TileColor" content="#da532c" />
<meta name="theme-color" content="#222222" /> <meta name="theme-color" content="#222222" />
<link rel="icon" href="favicon-64.png" sizes="64x64" type="image/png" />
<link rel="icon" href="favicon-62.png" sizes="62x62" type="image/png" />
<link rel="icon" href="favicon-32.png" sizes="32x32" type="image/png" />
<link rel="icon" href="favicon-16.png" sizes="16x16" type="image/png" />
<link rel="icon" href="favicon.ico" /> <link rel="icon" href="favicon.ico" />
<!-- Static OpenGraph meta --> <!-- Static OpenGraph meta -->
@@ -29,18 +28,28 @@
<meta property="og:url" content="https://stacjownik-td2.web.app/" /> <meta property="og:url" content="https://stacjownik-td2.web.app/" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:title" content="Stacjownik" /> <meta property="og:title" content="Stacjownik" />
<meta property="og:description" content="Pomocnik maszynisty i dyżurnego symulatora Train Driver 2" /> <meta
<meta property="og:image" content="https://raw.githubusercontent.com/Spythere/api/main/thumbnails/stacjownik.jpg" /> property="og:description"
content="Pomocnik maszynisty i dyżurnego symulatora Train Driver 2"
/>
<meta
property="og:image"
content="https://raw.githubusercontent.com/Spythere/api/main/thumbnails/stacjownik.jpg"
/>
<meta property="og:image:width" content="1200" /> <meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" /> <meta property="og:image:height" content="630" />
<meta property="og:site_name" content="Stacjownik" /> <meta property="og:site_name" content="Stacjownik" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Stacjownik" /> <meta name="twitter:title" content="Stacjownik" />
<meta name="twitter:description" content="Pomocnik maszynisty i dyżurnego symulatora Train Driver 2" /> <meta
<meta name="twitter:image" content="https://raw.githubusercontent.com/Spythere/api/main/thumbnails/stacjownik.jpg" /> name="twitter:description"
content="Pomocnik maszynisty i dyżurnego symulatora Train Driver 2"
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@500;700&display=swap" rel="stylesheet" /> />
<meta
name="twitter:image"
content="https://raw.githubusercontent.com/Spythere/api/main/thumbnails/stacjownik.jpg"
/>
</head> </head>
<body> <body>
+3894 -7678
View File
File diff suppressed because it is too large Load Diff
+16 -7
View File
@@ -1,33 +1,42 @@
{ {
"name": "stacjownik", "name": "stacjownik",
"version": "1.17.1", "version": "1.24.4",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vue-tsc --noEmit && vite build", "build": "vue-tsc --noEmit && vite build",
"deploy": "yarn build && firebase deploy --only hosting", "deploy": "yarn build && firebase deploy --only hosting",
"preview": "yarn build && vite preview" "preview": "yarn build && vite preview",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"format": "prettier --write src/"
}, },
"dependencies": { "dependencies": {
"core-js": "^3.32.2", "core-js": "^3.32.2",
"dotenv": "^16.3.1", "dotenv": "^16.3.1",
"firebase": "^10.4.0",
"howler": "^2.2.4",
"pinia": "^2.1.6", "pinia": "^2.1.6",
"sass": "^1.67.0", "sass": "^1.67.0",
"socket.io-client": "^4.7.2", "showdown": "^2.1.0",
"vue": "^3.3.4", "vue": "^3.3.4",
"vue-i18n": "^9.4.1", "vue-i18n": "^9.4.1",
"vue-router": "^4.2.4" "vue-router": "^4.2.4"
}, },
"devDependencies": { "devDependencies": {
"@rushstack/eslint-patch": "^1.3.3",
"@types/node": "^20.6.2", "@types/node": "^20.6.2",
"@vite-pwa/assets-generator": "^0.0.10", "@types/showdown": "^2.0.6",
"@vite-pwa/assets-generator": "^0.2.4",
"@vitejs/plugin-vue": "^4.3.4", "@vitejs/plugin-vue": "^4.3.4",
"@vue/eslint-config-prettier": "^8.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/tsconfig": "^0.4.0",
"axios": "^1.5.0", "axios": "^1.5.0",
"eslint": "^8.49.0",
"eslint-plugin-vue": "^9.17.0",
"prettier": "^3.0.3",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"vite": "^4.4.9", "vite": "^4.4.9",
"vite-plugin-pwa": "^0.16.5", "vite-plugin-pwa": "^0.20.0",
"vue-tsc": "^1.8.11" "vue-tsc": "^1.8.11"
}, },
"browserslist": [ "browserslist": [
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 363 B

+4
View File
@@ -0,0 +1,4 @@
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="60" height="60" fill="#898989"/>
<path d="M10.5573 31.3793L9.43741 28.0694C9.35445 27.8592 9.26596 27.6131 9.17195 27.3311C9.07793 27.0435 8.98391 26.7338 8.8899 26.402C8.80694 26.7393 8.71845 27.0518 8.62444 27.3394C8.53042 27.6269 8.44193 27.8758 8.35898 28.086L7.24736 31.3793H10.5573ZM15.0121 36H12.8386C12.5953 36 12.3989 35.9447 12.2496 35.8341C12.1003 35.7179 11.9869 35.5714 11.9095 35.3944L11.1961 33.2873H6.6003L5.88688 35.3944C5.82604 35.5493 5.71544 35.6903 5.55505 35.8175C5.4002 35.9392 5.20664 36 4.97436 36H2.78431L7.46305 23.9133H10.3333L15.0121 36ZM22.643 26.3688C22.5601 26.5015 22.4716 26.6011 22.3775 26.6674C22.2891 26.7338 22.1729 26.767 22.0291 26.767C21.9019 26.767 21.7637 26.7283 21.6143 26.6508C21.4706 26.5679 21.3046 26.4766 21.1166 26.3771C20.9341 26.2775 20.724 26.189 20.4861 26.1116C20.2483 26.0287 19.9773 25.9872 19.6732 25.9872C19.1478 25.9872 18.7551 26.1006 18.4952 26.3273C18.2408 26.5485 18.1136 26.8499 18.1136 27.2315C18.1136 27.4749 18.191 27.6767 18.3459 27.8371C18.5007 27.9975 18.7026 28.1357 18.9515 28.2519C19.2059 28.368 19.4934 28.4759 19.8142 28.5754C20.1405 28.6694 20.4723 28.7773 20.8097 28.8989C21.147 29.0151 21.4761 29.1533 21.7969 29.3137C22.1231 29.4741 22.4107 29.6787 22.6596 29.9276C22.914 30.1765 23.1186 30.4806 23.2735 30.8401C23.4283 31.1941 23.5058 31.6227 23.5058 32.1259C23.5058 32.6845 23.409 33.2071 23.2154 33.6938C23.0218 34.1805 22.7398 34.6063 22.3693 34.9713C22.0042 35.3308 21.5508 35.6156 21.0088 35.8258C20.4723 36.0304 19.8612 36.1327 19.1754 36.1327C18.7994 36.1327 18.415 36.094 18.0223 36.0166C17.6352 35.9392 17.2591 35.8313 16.8941 35.6931C16.5291 35.5493 16.1862 35.3806 15.8655 35.187C15.5447 34.9935 15.2654 34.7778 15.0276 34.54L15.8572 33.2293C15.9235 33.1352 16.0093 33.0578 16.1143 32.997C16.225 32.9306 16.3439 32.8974 16.4711 32.8974C16.637 32.8974 16.8029 32.95 16.9688 33.0551C17.1402 33.1601 17.331 33.2763 17.5412 33.4035C17.7569 33.5307 18.003 33.6468 18.2795 33.7519C18.556 33.857 18.8823 33.9095 19.2584 33.9095C19.7672 33.9095 20.1626 33.7989 20.4447 33.5777C20.7267 33.3509 20.8677 32.9942 20.8677 32.5075C20.8677 32.2255 20.7903 31.996 20.6355 31.819C20.4806 31.642 20.276 31.4955 20.0216 31.3793C19.7727 31.2632 19.4879 31.1609 19.1671 31.0724C18.8464 30.9839 18.5173 30.8871 18.18 30.7821C17.8426 30.6714 17.5135 30.5387 17.1928 30.3839C16.872 30.2235 16.5844 30.0161 16.33 29.7617C16.0812 29.5018 15.8793 29.181 15.7245 28.7994C15.5696 28.4123 15.4922 27.9367 15.4922 27.3725C15.4922 26.9191 15.5834 26.4766 15.7659 26.0452C15.9484 25.6139 16.2167 25.2295 16.5706 24.8922C16.9246 24.5548 17.3587 24.2866 17.873 24.0875C18.3874 23.8829 18.9763 23.7805 19.64 23.7805C20.0105 23.7805 20.37 23.811 20.7184 23.8718C21.0724 23.9271 21.407 24.0128 21.7222 24.129C22.0374 24.2396 22.3305 24.3751 22.6015 24.5354C22.8781 24.6903 23.1242 24.8673 23.3398 25.0664L22.643 26.3688ZM36.1186 29.9525C36.1186 30.8263 35.9665 31.6337 35.6623 32.3748C35.3637 33.1104 34.9406 33.7491 34.3931 34.2911C33.8456 34.8276 33.1847 35.2479 32.4105 35.552C31.6417 35.8507 30.7873 36 29.8471 36H25.1518V23.9133H29.8471C30.7873 23.9133 31.6417 24.0654 32.4105 24.3695C33.1847 24.6737 33.8456 25.094 34.3931 25.6305C34.9406 26.1669 35.3637 26.8057 35.6623 27.5468C35.9665 28.2823 36.1186 29.0842 36.1186 29.9525ZM33.2483 29.9525C33.2483 29.3552 33.1709 28.816 33.016 28.3348C32.8612 27.8537 32.6372 27.4472 32.3441 27.1154C32.0565 26.778 31.7026 26.5209 31.2823 26.3439C30.8619 26.1614 30.3836 26.0701 29.8471 26.0701H27.9723V33.8431H29.8471C30.3836 33.8431 30.8619 33.7547 31.2823 33.5777C31.7026 33.3952 32.0565 33.138 32.3441 32.8062C32.6372 32.4688 32.8612 32.0596 33.016 31.5784C33.1709 31.0973 33.2483 30.5553 33.2483 29.9525ZM40.594 26.0701V28.8906H44.3934V30.9646H40.594V33.8431H45.5547V36H37.7735V23.9133H45.5547V26.0701H40.594ZM50.0882 28.8077H50.5361C50.9509 28.8077 51.2496 28.6777 51.4321 28.4178L54.153 24.4691C54.3134 24.2589 54.4849 24.1151 54.6674 24.0377C54.8554 23.9547 55.0877 23.9133 55.3642 23.9133H57.8031L54.2194 28.7994C53.965 29.1368 53.6912 29.3801 53.3981 29.5294C53.6083 29.6068 53.7991 29.7147 53.9705 29.8529C54.142 29.9912 54.3024 30.1709 54.4517 30.3922L58.1018 36H55.5965C55.4361 36 55.2978 35.9889 55.1817 35.9668C55.0711 35.9447 54.9743 35.9115 54.8913 35.8673C54.8084 35.823 54.7365 35.7705 54.6757 35.7097C54.6148 35.6433 54.5568 35.5686 54.5015 35.4857L51.7639 31.2798C51.6643 31.1249 51.5371 31.0171 51.3823 30.9563C51.233 30.8899 51.0284 30.8567 50.7684 30.8567H50.0882V36H47.2843V23.9133H50.0882V28.8077Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 537 B

Before

Width:  |  Height:  |  Size: 482 B

After

Width:  |  Height:  |  Size: 482 B

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 212 B

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

+56
View File
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Warstwa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 159 38.8" style="enable-background:new 0 0 159 38.8;" xml:space="preserve">
<style type="text/css">
.st0{fill:#00A962;}
.st1{enable-background:new ;}
.st2{fill:#FFFFFF;}
.st3{fill:#1E3A33;}
.st4{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
</style>
<path class="st0" d="M139.6,38.7H19.4C8.7,38.7,0,30.1,0,19.3l0,0C0,8.6,8.7-0.1,19.4-0.1h120.2c10.7,0,19.4,8.7,19.4,19.4l0,0
C159,30.1,150.3,38.7,139.6,38.7z"/>
<g class="st1">
<path class="st2" d="M48.9,23.7c0,0.5-0.4,0.9-0.9,0.9c-0.5,0-0.9-0.4-0.9-0.9v-9.9c0-0.6,0.4-1,1-1h3.7c2.5,0,3.6,1.9,3.6,3.7
s-1,3.7-3.6,3.7h-2.9V23.7z M48.9,14.5v4.1h2.8c1.3,0,1.9-1,1.9-2c0-1-0.5-2.1-1.8-2.1H48.9z"/>
<path class="st2" d="M56.3,20.5c0-2.5,1.9-4.1,4.1-4.1c2.3,0,4.2,1.6,4.2,4.1c0,2.5-1.9,4.2-4.2,4.2C58.2,24.7,56.3,23,56.3,20.5z
M62.9,20.5c0-1.5-1.1-2.4-2.4-2.4c-1.3,0-2.4,1-2.4,2.4c0,1.5,1.1,2.5,2.4,2.5C61.8,23,62.9,22,62.9,20.5z"/>
<path class="st2" d="M66.6,21.9c0.4-0.2,0.7,0.1,0.9,0.3c0.3,0.6,0.9,1,1.7,1c0.8,0,1.4-0.4,1.4-1c0-0.5-0.5-0.7-1.1-0.9l-1.1-0.3
c-1.7-0.5-2.3-1.4-2.2-2.7c0.1-1.2,1.4-2.1,2.8-2.1c1.1,0,2,0.3,2.5,1.2c0.2,0.4,0.1,0.8-0.2,1c-0.3,0.2-0.6,0.2-1-0.1
c-0.4-0.4-1-0.5-1.4-0.5c-0.4,0-0.9,0.2-1.1,0.4c-0.1,0.2-0.2,0.4-0.1,0.7c0.1,0.3,0.6,0.5,1,0.6l1.2,0.3c1.7,0.4,2.1,1.5,2.1,2.3
c0,1.5-1.3,2.4-3.2,2.4c-1.2,0-2.5-0.6-2.9-1.8C66,22.5,66.2,22.1,66.6,21.9z"/>
<path class="st2" d="M74.6,18h-0.8c-0.4,0-0.7-0.3-0.7-0.7c0-0.4,0.3-0.7,0.7-0.7h0.8v-2.2c0-0.5,0.4-0.9,0.9-0.9
c0.5,0,0.9,0.4,0.9,0.9v2.2h1c0.4,0,0.7,0.3,0.7,0.7c0,0.4-0.3,0.7-0.7,0.7h-1v5.7c0,0.5-0.4,0.9-0.9,0.9c-0.5,0-0.9-0.4-0.9-0.9
V18z"/>
<path class="st2" d="M85.7,23.4c-0.5,0.9-1.7,1.3-2.7,1.3c-2.1,0-4-1.6-4-4.1c0-2.5,1.9-4.1,4-4.1c1,0,2.1,0.4,2.7,1.3v-0.3
c0-0.5,0.4-0.9,0.9-0.9c0.5,0,0.9,0.4,0.9,0.9v6.3c0,0.5-0.4,0.9-0.9,0.9c-0.5,0-0.9-0.4-0.9-0.9V23.4z M83.2,23
c1.3,0,2.4-0.9,2.4-2.5c0-1.6-1.3-2.4-2.4-2.4c-1.3,0-2.4,1-2.4,2.4C80.8,22,81.9,23,83.2,23z"/>
<path class="st2" d="M95.1,16.6c0.5,0,0.9,0.3,1,0.8l1.6,4.6l1.7-4.8c0.2-0.5,0.6-0.7,1.1-0.6c0.5,0.1,0.7,0.6,0.6,1.1l-2.4,6.3
c-0.2,0.5-0.5,0.7-0.9,0.7h-0.1c-0.4,0-0.7-0.2-0.9-0.7L95.1,19l-1.7,4.9c-0.2,0.5-0.5,0.7-0.9,0.7h-0.1c-0.4,0-0.7-0.2-0.9-0.7
l-2.4-6.3c-0.2-0.4,0.1-1,0.6-1.1c0.5-0.1,0.9,0.1,1.1,0.6l1.7,4.8l1.6-4.6C94.2,16.8,94.6,16.6,95.1,16.6L95.1,16.6z"/>
<path class="st2" d="M112.9,23.2c0.3,0.3,0.3,0.9,0,1.2c-0.4,0.3-0.9,0.3-1.2,0l-3.2-3.5v2.9c0,0.5-0.4,0.9-0.9,0.9
c-0.5,0-0.8-0.4-0.8-0.9V13.1c0-0.5,0.4-0.9,0.8-0.9c0.5,0,0.9,0.4,0.9,0.9v6.1l2.4-2.4c0.3-0.3,0.9-0.3,1.2,0
c0.3,0.4,0.3,0.9,0,1.2l-2,2.1L112.9,23.2z"/>
<path class="st2" d="M120.8,23.4c-0.5,0.9-1.7,1.3-2.7,1.3c-2.1,0-4-1.6-4-4.1c0-2.5,1.9-4.1,4-4.1c1,0,2.1,0.4,2.7,1.3v-0.3
c0-0.5,0.4-0.9,0.8-0.9c0.5,0,0.9,0.4,0.9,0.9v6.3c0,0.5-0.4,0.9-0.9,0.9c-0.5,0-0.8-0.4-0.8-0.9V23.4z M118.4,23
c1.3,0,2.4-0.9,2.4-2.5c0-1.6-1.3-2.4-2.4-2.4c-1.3,0-2.4,1-2.4,2.4C115.9,22,117,23,118.4,23z"/>
<path class="st2" d="M130.3,16.6c0.5,0,0.9,0.3,1,0.8l1.6,4.6l1.7-4.8c0.2-0.5,0.6-0.7,1.1-0.6c0.5,0.1,0.7,0.6,0.6,1.1l-2.4,6.3
c-0.2,0.5-0.5,0.7-0.9,0.7h-0.1c-0.4,0-0.7-0.2-0.9-0.7l-1.7-4.9l-1.7,4.9c-0.2,0.5-0.5,0.7-0.9,0.7h-0.1c-0.4,0-0.7-0.2-0.9-0.7
l-2.4-6.3c-0.2-0.4,0.1-1,0.6-1.1c0.5-0.1,0.9,0.1,1.1,0.6l1.7,4.8l1.6-4.6C129.3,16.8,129.7,16.6,130.3,16.6L130.3,16.6z"/>
<path class="st2" d="M143.6,26.1c0,0.2,0.2,0.5,0.6,0.5c0.1,0,0.4,0,0.5-0.4c0.1-0.4,0.3-0.5,0.7-0.5c0.4,0.1,0.6,0.4,0.5,0.8
c-0.2,0.8-0.9,1.4-1.7,1.4c-1.3,0-1.9-0.8-1.9-1.7c0-0.2,0.1-0.6,0.2-0.8l0.5-1c-0.5,0.2-1,0.3-1.6,0.3c-2.3,0-4.1-1.6-4.1-4.2
c0-2.5,1.8-4.1,4.1-4.1c2.2,0,3.9,1.5,4,4c0,0.5-0.4,0.8-0.8,0.8h-5.5c0.2,1.2,1.2,2,2.4,2c0.8,0,1.3-0.3,1.9-0.8
c0.3-0.2,0.8-0.4,1.1-0.1c0.3,0.3,0.2,0.7,0,1.1C143.5,25.9,143.6,26.1,143.6,26.1z M143.7,19.9c-0.2-1.2-1.1-2-2.3-2
c-1.2,0-2.2,0.7-2.3,2H143.7z"/>
</g>
<g>
<path class="st3" d="M21.6,26.7c-4.9,0-7.4-2.6-8.5-4.9c-1.2-2.4-1.4-5-1.4-6c0-2.2,1.8-3.8,4.3-3.8h7c0.7,0,1.3,0.6,1.3,1.3
c0,0.7-0.6,1.3-1.3,1.3h-7c-0.5,0-1,0.1-1.3,0.4c-0.3,0.2-0.4,0.4-0.4,0.8c0,1.9,0.5,8.3,7.3,8.3c5.8,0,7.3-4.6,7.9-8.1
c0-0.2,0-0.3,0.1-0.4c0.2-0.9,0.4-1.7,0.8-2.3C31,12.4,31.9,12,33,12c0.5,0,0.9,0.2,1.2,0.5c0.5,0.4,0.9,1.3,1.2,4.1
c0.1,1.4,0.1,2.6,0.1,2.7c0,0.7-0.6,1.3-1.3,1.3l0,0c-0.7,0-1.3-0.6-1.3-1.3c0,0,0-1.1-0.1-2.3c-0.1-1-0.2-1.7-0.3-2.1
c-0.1,0.3-0.2,0.9-0.3,1.1c0,0.1,0,0.2-0.1,0.4c-0.2,1.2-0.7,3.7-2.1,5.9c-0.8,1.3-1.9,2.3-3.2,3.1C25.4,26.3,23.6,26.7,21.6,26.7z
"/>
<ellipse class="st4" cx="26.7" cy="13.3" rx="1.3" ry="1.3"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

+18
View File
@@ -0,0 +1,18 @@
<svg width="256" height="213" viewBox="0 0 256 213" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_d_1571_41)">
<path d="M217.048 55.9333L238 80.4039L128 194.6L18 80.4039L38.9524 55.9333L71.6905 18.6H128H184.31L217.048 55.9333Z" fill="#F47FFF"/>
<path d="M238 80.4039L217.048 55.9333L184.31 18.6M238 80.4039L128 194.6M238 80.4039H164.536M128 194.6L18 80.4039M128 194.6L91.4641 80.4039M128 194.6L164.536 80.4039M184.31 18.6H128M184.31 18.6L164.536 80.4039M18 80.4039L38.9524 55.9333L71.6905 18.6M18 80.4039H91.4641M71.6905 18.6L91.4641 80.4039M71.6905 18.6H128M91.4641 80.4039H128H164.536M91.4641 80.4039L128 18.6M128 18.6L164.536 80.4039" stroke="#ECECEC" stroke-width="7.45763" stroke-linejoin="round"/>
</g>
<defs>
<filter id="filter0_d_1571_41" x="0.367179" y="0.967155" width="255.266" height="211.266" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="6.952"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.956863 0 0 0 0 0.498039 0 0 0 0 1 0 0 0 1 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1571_41"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1571_41" result="shape"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 264 B

Before

Width:  |  Height:  |  Size: 582 B

After

Width:  |  Height:  |  Size: 582 B

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 256 B

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 632 B

After

Width:  |  Height:  |  Size: 632 B

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 398 B

Before

Width:  |  Height:  |  Size: 938 B

After

Width:  |  Height:  |  Size: 938 B

Before

Width:  |  Height:  |  Size: 356 B

After

Width:  |  Height:  |  Size: 356 B

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 369 B

After

Width:  |  Height:  |  Size: 369 B

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 252 B

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 264 B

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 199 B

Before

Width:  |  Height:  |  Size: 384 B

After

Width:  |  Height:  |  Size: 384 B

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 270 B

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 476 B

After

Width:  |  Height:  |  Size: 476 B

Before

Width:  |  Height:  |  Size: 863 B

After

Width:  |  Height:  |  Size: 863 B

Before

Width:  |  Height:  |  Size: 304 B

After

Width:  |  Height:  |  Size: 304 B

Before

Width:  |  Height:  |  Size: 546 B

After

Width:  |  Height:  |  Size: 546 B

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 230 B

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 199 B

Before

Width:  |  Height:  |  Size: 522 B

After

Width:  |  Height:  |  Size: 522 B

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 268 B

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 478 B

Before

Width:  |  Height:  |  Size: 477 B

After

Width:  |  Height:  |  Size: 477 B

Before

Width:  |  Height:  |  Size: 477 B

After

Width:  |  Height:  |  Size: 477 B

Before

Width:  |  Height:  |  Size: 477 B

After

Width:  |  Height:  |  Size: 477 B

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 457 B

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 285 B

@@ -1,4 +1,4 @@
<svg width="160" height="150" viewBox="0 0 160 150" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="160" height="150" viewBox="0 0 160 150" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.163 139L80 12.4204L149.837 139H80H10.163Z" stroke="white" stroke-width="12"/> <path d="M10.163 139L80 12.4204L149.837 139H80H10.163Z" stroke="salmon" stroke-width="15"/>
<path d="M85.4488 50.3354V80.6619C85.4488 83.8784 85.2898 87.0418 84.9717 90.1522C84.6536 93.2273 84.2294 96.4968 83.6992 99.9606H74.8451C74.315 96.4968 73.8908 93.2273 73.5727 90.1522C73.2546 87.0418 73.0955 83.8784 73.0955 80.6619V50.3354H85.4488ZM71.0808 119.789C71.0808 118.694 71.2752 117.651 71.664 116.661C72.0882 115.672 72.6537 114.823 73.3606 114.117C74.1029 113.41 74.9689 112.844 75.9585 112.42C76.9482 111.996 78.0086 111.784 79.1396 111.784C80.2354 111.784 81.278 111.996 82.2677 112.42C83.2574 112.844 84.1057 113.41 84.8126 114.117C85.5195 114.823 86.085 115.672 86.5092 116.661C86.9333 117.651 87.1454 118.694 87.1454 119.789C87.1454 120.921 86.9333 121.981 86.5092 122.971C86.085 123.925 85.5195 124.756 84.8126 125.462C84.1057 126.169 83.2574 126.717 82.2677 127.106C81.278 127.53 80.2354 127.742 79.1396 127.742C78.0086 127.742 76.9482 127.53 75.9585 127.106C74.9689 126.717 74.1029 126.169 73.3606 125.462C72.6537 124.756 72.0882 123.925 71.664 122.971C71.2752 121.981 71.0808 120.921 71.0808 119.789Z" fill="#FFFBFB"/> <path d="M85.4488 50.3354V80.6619C85.4488 83.8784 85.2898 87.0418 84.9717 90.1522C84.6536 93.2273 84.2294 96.4968 83.6992 99.9606H74.8451C74.315 96.4968 73.8908 93.2273 73.5727 90.1522C73.2546 87.0418 73.0955 83.8784 73.0955 80.6619V50.3354H85.4488ZM71.0808 119.789C71.0808 118.694 71.2752 117.651 71.664 116.661C72.0882 115.672 72.6537 114.823 73.3606 114.117C74.1029 113.41 74.9689 112.844 75.9585 112.42C76.9482 111.996 78.0086 111.784 79.1396 111.784C80.2354 111.784 81.278 111.996 82.2677 112.42C83.2574 112.844 84.1057 113.41 84.8126 114.117C85.5195 114.823 86.085 115.672 86.5092 116.661C86.9333 117.651 87.1454 118.694 87.1454 119.789C87.1454 120.921 86.9333 121.981 86.5092 122.971C86.085 123.925 85.5195 124.756 84.8126 125.462C84.1057 126.169 83.2574 126.717 82.2677 127.106C81.278 127.53 80.2354 127.742 79.1396 127.742C78.0086 127.742 76.9482 127.53 75.9585 127.106C74.9689 126.717 74.1029 126.169 73.3606 125.462C72.6537 124.756 72.0882 123.925 71.664 122.971C71.2752 121.981 71.0808 120.921 71.0808 119.789Z" fill="white"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

+48
View File
@@ -0,0 +1,48 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="512" height="512" rx="256" fill="#121212"/>
<rect x="325.818" y="405.665" width="7.11086" height="143.867" rx="3.55543" transform="rotate(90 325.818 405.665)" fill="white"/>
<rect x="361.785" y="430.553" width="10.6663" height="208.608" rx="5.33314" transform="rotate(90 361.785 430.553)" fill="white"/>
<g filter="url(#filter0_d_272_208)">
<rect width="25.0328" height="117.468" rx="12.5164" transform="matrix(0.711174 0.703016 -0.711174 0.703016 211.54 363)" fill="white"/>
</g>
<g filter="url(#filter1_d_272_208)">
<rect width="25.0328" height="117.468" rx="12.5164" transform="matrix(-0.711174 0.703016 0.711174 0.703016 300.46 363)" fill="white"/>
</g>
<g filter="url(#filter2_d_272_208)">
<rect x="139.352" y="65.4912" width="232.66" height="325.893" rx="41.5866" stroke="#7A7A7A" stroke-width="8.31733"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M135.193 107.078C135.193 81.8134 155.674 61.3325 180.938 61.3325H330.425C355.69 61.3325 376.171 81.8134 376.171 107.078V349.797C376.171 375.062 355.69 395.543 330.426 395.543H180.938C155.674 395.543 135.193 375.062 135.193 349.797V107.078ZM208.217 338.656C208.217 352.401 196.774 363.544 182.659 363.544C168.543 363.544 157.1 352.401 157.1 338.656C157.1 324.91 168.543 313.768 182.659 313.768C196.774 313.768 208.217 324.91 208.217 338.656ZM328.706 363.544C342.821 363.544 354.264 352.401 354.264 338.656C354.264 324.91 342.821 313.768 328.706 313.768C314.591 313.768 303.148 324.91 303.148 338.656C303.148 352.401 314.591 363.544 328.706 363.544ZM248.38 136.323C248.38 132.07 244.932 128.622 240.679 128.622H164.802C160.549 128.622 157.101 132.07 157.101 136.323V203.223C157.101 207.476 160.549 210.924 164.802 210.924H240.679C244.932 210.924 248.38 207.476 248.38 203.223V136.323ZM346.563 128.622C350.817 128.622 354.265 132.07 354.265 136.323V203.223C354.265 207.476 350.817 210.924 346.563 210.924H270.686C266.433 210.924 262.985 207.476 262.985 203.223V136.323C262.985 132.07 266.433 128.622 270.686 128.622H346.563Z" fill="white"/>
<ellipse cx="255.682" cy="64.888" rx="25.5582" ry="24.888" fill="#F3F1F1"/>
</g>
<defs>
<filter id="filter0_d_272_208" x="106.676" y="341.617" width="143.99" height="142.947" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="13.269"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_272_208"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_272_208" result="shape"/>
</filter>
<filter id="filter1_d_272_208" x="261.334" y="341.617" width="143.99" height="142.947" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="13.269"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_272_208"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_272_208" result="shape"/>
</filter>
<filter id="filter2_d_272_208" x="110.241" y="15.048" width="290.882" height="405.446" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="12.476"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_272_208"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_272_208" result="shape"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

-105
View File
@@ -1,105 +0,0 @@
@import './styles/responsive.scss';
@import './styles/variables.scss';
@import './styles/global.scss';
// VUE ROUTE CHANGE ANIMATION
.view-anim {
&-enter-from,
&-leave-to {
opacity: 0.02;
}
&-enter-active,
&-leave-active {
transition: all $animDuration $animType;
min-height: 100%;
}
}
.modal-anim {
&-enter-active,
&-leave-active {
transition: all $animDuration $animType;
}
&-enter-from,
&-leave-to {
transform: translateY(-25%);
opacity: 0;
}
}
.route {
margin: 0 0.2em;
&-active,
&[data-active='true'] {
color: $accentCol;
font-weight: bold;
}
}
// APP
#app {
color: white;
font-size: 1rem;
@include smallScreen() {
font-size: calc(0.55rem + 1.1vw);
}
@include screenLandscape() {
font-size: calc(0.45rem + 0.8vw);
}
}
// CONTAINER
.app_container {
display: flex;
flex-flow: column;
min-height: 100vh;
header {
flex: 0 0 auto;
}
main {
flex: 1 1 auto;
padding: 0 0.5em;
}
footer {
flex: 0 1 0.2em;
}
}
.warning {
background-color: firebrick;
text-align: center;
padding: 0.5em 0.4em;
max-width: 1100px;
margin: 0 auto;
border-radius: 0 0 1em 1em;
}
// FOOTER
footer.app_footer {
max-width: 100%;
padding: 0.5em;
img {
width: 1.1em;
vertical-align: text-bottom;
}
z-index: 10;
background: #111;
color: white;
text-align: center;
vertical-align: middle;
}
+181 -91
View File
@@ -1,18 +1,23 @@
<template> <template>
<div class="app_container"> <div class="app_container">
<UpdateCard
:is-update-card-open="isUpdateCardOpen"
@toggle-card="() => (isUpdateCardOpen = false)"
/>
<Tooltip />
<transition name="modal-anim"> <transition name="modal-anim">
<keep-alive> <keep-alive>
<TrainModal v-if="store.chosenModalTrainId" /> <TrainModal />
</keep-alive> </keep-alive>
</transition> </transition>
<UpdatePrompt />
<AppHeader :current-lang="currentLang" @change-lang="changeLang" /> <AppHeader :current-lang="currentLang" @change-lang="changeLang" />
<main class="app_main"> <main class="app_main">
<router-view v-slot="{ Component }"> <router-view v-slot="{ Component }">
<keep-alive exclude="JournalView"> <keep-alive exclude="SceneryView">
<component :is="Component" :key="$route.name" /> <component :is="Component" :key="$route.name" />
</keep-alive> </keep-alive>
</router-view> </router-view>
@@ -22,9 +27,14 @@
&copy; &copy;
<a href="https://td2.info.pl/profile/?u=20777" target="_blank">Spythere</a> <a href="https://td2.info.pl/profile/?u=20777" target="_blank">Spythere</a>
{{ new Date().getUTCFullYear() }} | {{ new Date().getUTCFullYear() }} |
<a :href="releaseURL" target="_blank">v{{ VERSION }}{{ isOnProductionHost ? '' : 'dev' }}</a> <button class="btn--text" @click="() => (isUpdateCardOpen = true)">
v{{ VERSION }}{{ isOnProductionHost ? '' : 'dev' }}
</button>
<br /> <br />
<a href="https://discord.gg/x2mpNN3svk"><img :src="getIcon('discord', 'png')" alt="">&nbsp;<b>{{ $t('footer.discord') }}</b></a> <a href="https://discord.gg/x2mpNN3svk">
<img src="/images/icon-discord.png" alt="" />&nbsp;<b>{{ $t('footer.discord') }}</b>
</a>
<div style="display: none">&int; ukryta taktyczna całka do programowania w HTMLu</div> <div style="display: none">&int; ukryta taktyczna całka do programowania w HTMLu</div>
</footer> </footer>
@@ -32,114 +42,81 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { computed, defineComponent, KeepAlive, provide, ref, watch } from 'vue'; import { defineComponent } from 'vue';
import axios from 'axios';
import { version } from '.././package.json';
import { Status } from './typings/common';
import { useMainStore } from './store/mainStore';
import { useApiStore } from './store/apiStore';
import { useTooltipStore } from './store/tooltipStore';
import Clock from './components/App/Clock.vue'; import Clock from './components/App/Clock.vue';
import packageInfo from '.././package.json';
import StatusIndicator from './components/App/StatusIndicator.vue'; import StatusIndicator from './components/App/StatusIndicator.vue';
import SelectBox from './components/Global/SelectBox.vue';
import { useStore } from './store/store';
import TrainModal from './components/Global/TrainModal.vue';
import StorageManager from './scripts/managers/storageManager';
import imageMixin from './mixins/imageMixin';
import AppHeader from './components/App/AppHeader.vue'; import AppHeader from './components/App/AppHeader.vue';
import axios from 'axios'; import TrainModal from './components/TrainsView/TrainModal.vue';
import UpdatePrompt from './components/App/UpdatePrompt.vue'; import Tooltip from './components/Tooltip/Tooltip.vue';
import { VERSION } from 'vue-i18n'; import UpdateCard from './components/App/UpdateCard.vue';
import { RouterView } from 'vue-router';
import useCustomSW from './mixins/useCustomSW'; import StorageManager from './managers/storageManager';
const STORAGE_VERSION_KEY = 'app_version';
export default defineComponent({ export default defineComponent({
components: { components: {
Clock, Clock,
StatusIndicator, StatusIndicator,
SelectBox,
TrainModal,
AppHeader, AppHeader,
UpdatePrompt, TrainModal,
}, UpdateCard,
Tooltip
mixins: [imageMixin],
setup() {
const store = useStore();
store.connectToAPI();
const { offlineReady } = useCustomSW();
const isFilterCardVisible = ref(false);
provide('isFilterCardVisible', isFilterCardVisible);
return {
store,
isFilterCardVisible,
onlineDispatchers: computed(() =>
store.stationList.filter((station) => station.onlineInfo && station.onlineInfo.region == store.region.id)
),
dispatcherDataStatus: store.dataStatuses.dispatchers,
};
}, },
data: () => ({ data: () => ({
VERSION: packageInfo.version, VERSION: version,
store: useMainStore(),
apiStore: useApiStore(),
tooltipStore: useTooltipStore(),
isUpdateCardOpen: false,
currentLang: 'pl', currentLang: 'pl',
releaseURL: '',
isOnProductionHost: location.hostname == 'stacjownik-td2.web.app', isOnProductionHost: location.hostname == 'stacjownik-td2.web.app',
nextUpdateTime: 0
}), }),
created() { created() {
this.loadLang(); this.init();
this.store.isOffline = !window.navigator.onLine;
window.addEventListener('offline', () => {
this.store.isOffline = true;
this.store.apiData = {
stations: [],
dispatchers: [],
trains: [],
connectedSocketCount: 0,
};
this.store.setOnlineData();
});
window.addEventListener('online', () => {
this.store.isOffline = false;
});
}, },
async mounted() { async mounted() {
this.setReleaseURL(); window.addEventListener('mousemove', (e: MouseEvent) => this.tooltipStore.handle(e));
watch(
() => this.store.blockScroll,
(value) => {
if (value) {
document.body.classList.add('no-scroll');
return;
}
document.body.classList.remove('no-scroll');
}
);
}, },
methods: { methods: {
changeLang(lang: string) { init() {
this.$i18n.locale = lang; this.loadLang();
this.currentLang = lang; this.setupOfflineHandling();
this.checkAppVersion();
StorageManager.setStringValue('lang', lang); this.apiStore.setupAPIData();
window.requestAnimationFrame(this.update);
if (!this.isOnProductionHost) document.title = 'Stacjownik Dev';
}, },
async setReleaseURL() { update(t: number) {
if (t >= this.nextUpdateTime) {
this.apiStore.fetchActiveData();
this.nextUpdateTime = t + 20000;
}
window.requestAnimationFrame(this.update);
},
async checkAppVersion() {
const storageVersion = StorageManager.getStringValue(STORAGE_VERSION_KEY);
try { try {
const releaseData = await ( const releaseData = await (
await axios.get('https://api.github.com/repos/Spythere/stacjownik/releases/latest') await axios.get('https://api.github.com/repos/Spythere/stacjownik/releases/latest')
@@ -147,11 +124,48 @@ export default defineComponent({
if (!releaseData) return; if (!releaseData) return;
this.releaseURL = releaseData.html_url; this.store.appUpdate = {
version,
changelog: releaseData.body,
releaseURL: releaseData.html_url
};
this.isUpdateCardOpen =
storageVersion != version || import.meta.env.VITE_UPDATE_TEST === 'test';
} catch (error) { } catch (error) {
console.error(`Wystąpił błąd podczas pobierania danych z API GitHuba: ${error}`); console.error(`Wystąpił błąd podczas pobierania danych z API GitHuba: ${error}`);
return;
} }
StorageManager.setStringValue(STORAGE_VERSION_KEY, version);
},
setupOfflineHandling() {
this.store.isOffline = !window.navigator.onLine;
if (this.store.isOffline) this.handleOfflineMode();
window.addEventListener('offline', this.handleOfflineMode);
window.addEventListener('online', this.handleOnlineMode);
},
handleOfflineMode() {
this.store.isOffline = true;
this.apiStore.activeData = undefined;
this.apiStore.dataStatuses.connection = Status.Data.Offline;
},
handleOnlineMode() {
this.store.isOffline = false;
this.apiStore.connectToAPI();
},
changeLang(lang: string) {
this.$i18n.locale = lang;
this.currentLang = lang;
StorageManager.setStringValue('lang', lang);
}, },
loadLang() { loadLang() {
@@ -170,9 +184,85 @@ export default defineComponent({
this.changeLang('en'); this.changeLang('en');
return; return;
} }
}, }
}, }
}); });
</script> </script>
<style lang="scss" src="./App.scss"></style> <style lang="scss">
@import './styles/global';
@import './styles/animations';
.route {
margin: 0 0.2em;
&-active,
&[data-active='true'] {
color: $accentCol;
font-weight: bold;
}
}
// APP
#app {
color: white;
font-size: 1rem;
overflow-x: hidden;
@include smallScreen() {
font-size: calc(0.65rem + 0.85vw);
}
@include screenLandscape() {
font-size: calc(0.45rem + 0.8vw);
}
}
// CONTAINER
.app_container {
display: grid;
grid-template-rows: auto 1fr auto;
grid-template-columns: 100%;
min-height: 100vh;
overflow: hidden;
}
.app_main {
padding: 0 0.5em;
}
.warning {
background-color: firebrick;
text-align: center;
padding: 0.5em 0.4em;
max-width: 1100px;
margin: 0 auto;
border-radius: 0 0 1em 1em;
}
// FOOTER
.app_footer {
max-width: 100%;
padding: 0.5em;
button {
display: inline-block;
padding: 0.1em;
}
img {
width: 1.1em;
vertical-align: text-bottom;
}
z-index: 10;
background: #111;
color: white;
text-align: center;
vertical-align: middle;
}
</style>
-3
View File
@@ -1,3 +0,0 @@
<svg width="144" height="144" viewBox="0 0 144 144" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M67.4283 9.79351L67.8252 31.2232H79.5983L79.8628 9.79351H67.4283ZM67.8252 110.989L67.4283 132.816H79.8628L79.466 110.989H67.8252ZM91.6359 51.33L103.938 43.7899C102.439 40.527 100.322 37.3963 97.5886 34.3979C94.9429 31.3995 91.5918 28.9303 87.5352 26.9901C83.5667 25.05 78.8046 24.0799 73.2487 24.0799C67.6929 24.0799 62.7103 25.1382 58.3009 27.2547C53.8915 29.3712 50.4081 32.1932 47.8506 35.7207C45.3814 39.2483 44.1467 43.1726 44.1467 47.4938C44.1467 51.9032 44.9404 55.6512 46.5278 58.7378C48.1152 61.8243 50.1435 64.47 52.6128 66.6747C55.082 68.7912 57.6836 70.5549 60.4174 71.9659C63.2394 73.2888 65.7969 74.347 68.0897 75.1407C71.6173 76.4635 74.9243 77.8745 78.0109 79.3737C81.1856 80.8729 83.7431 82.7249 85.6832 84.9296C87.7115 87.0461 88.7257 89.824 88.7257 93.2633C88.7257 95.9089 88.1966 98.2018 87.1383 100.142C86.1683 101.994 84.625 103.405 82.5085 104.375C80.4801 105.345 77.8786 105.83 74.7038 105.83C71.0881 105.83 67.8693 105.08 65.0473 103.581C62.3134 102.082 59.8001 99.9215 57.5072 97.0995C55.2143 94.2775 53.0978 90.8381 51.1577 86.7815L39.12 94.5861C41.0602 99.3483 43.7499 103.581 47.1892 107.285C50.6286 110.989 54.6411 113.943 59.2269 116.148C63.8126 118.265 68.7512 119.323 74.0424 119.323C80.6565 119.323 86.2564 118.265 90.8422 116.148C95.428 113.943 98.9555 110.813 101.425 106.756C103.894 102.699 105.129 97.9814 105.129 92.6019C105.129 88.4571 104.423 84.8414 103.012 81.7548C101.601 78.6682 99.7492 76.0667 97.4563 73.9502C95.1634 71.7455 92.606 69.8935 89.784 68.3943C87.0501 66.8951 84.3604 65.6605 81.7148 64.6904C78.0109 63.2794 74.5275 61.8684 71.2645 60.4574C68.0016 59.0464 65.3559 57.3709 63.3276 55.4307C61.2993 53.4906 60.2851 51.0213 60.2851 48.0229C60.2851 45.7301 60.7261 43.7899 61.6079 42.2025C62.578 40.527 64.0331 39.2483 65.9732 38.3664C68.0016 37.4845 70.559 37.0436 73.6456 37.0436C76.644 37.0436 79.2455 37.705 81.4502 39.0278C83.6549 40.3506 85.5509 42.1144 87.1383 44.319C88.8139 46.4356 90.3131 48.7725 91.6359 51.33Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

+30 -64
View File
@@ -3,8 +3,13 @@
<div class="header_container"> <div class="header_container">
<div class="header_icons"> <div class="header_icons">
<span class="icons-top"> <span class="icons-top">
<img :src="getIcon('pl')" alt="icon-pl" @click="changeLang('en')" v-if="currentLang == 'pl'" /> <img
<img :src="getIcon('en', 'jpg')" alt="icon-en" @click="changeLang('pl')" v-else /> src="/images/icon-pl.svg"
alt="icon-pl"
@click="changeLang('en')"
v-if="currentLang == 'pl'"
/>
<img src="/images/icon-en.jpg" alt="icon-en" @click="changeLang('pl')" v-else />
</span> </span>
</div> </div>
@@ -13,7 +18,7 @@
<span class="header_brand"> <span class="header_brand">
<router-link to="/"> <router-link to="/">
<img :src="getImage('stacjownik-header-logo.svg')" alt="Stacjownik" /> <img src="/images/stacjownik-header-logo.svg" alt="Stacjownik" />
</router-link> </router-link>
</span> </span>
@@ -21,22 +26,17 @@
<Clock /> <Clock />
<div class="info_counter"> <div class="info_counter">
<img :src="getIcon('dispatcher')" alt="icon dispatcher" /> <img src="/images/icon-dispatcher.svg" alt="icon dispatcher" />
<span class="text--primary">{{ onlineDispatchersCount }}</span> <span class="text--primary">{{ onlineDispatchersCount }}</span>
<!-- <span class="g-tooltip">
<b class="text--primary">{{ factorU }}U</b>
<div class="content">Test</div>
</span> -->
<span class="text--grayed"> / </span> <span class="text--grayed"> / </span>
<span class="text--primary">{{ onlineTrainsCount }}</span> <span class="text--primary">{{ onlineTrainsCount }}</span>
<img :src="getIcon('train')" alt="icon train" /> <img src="/images/icon-train.svg" alt="icon train" />
</div> </div>
<span class="info_region"> <div class="info_region">
<SelectBox :itemList="computedRegions" :defaultItemIndex="0" @selected="changeRegion" /> <RegionDropdown />
</span> </div>
</span> </span>
<span class="header_links"> <span class="header_links">
@@ -44,7 +44,9 @@
{{ $t('app.sceneries') }} {{ $t('app.sceneries') }}
</router-link> </router-link>
/ /
<router-link class="route" active-class="route-active" to="/trains">{{ $t('app.trains') }}</router-link> <router-link class="route" active-class="route-active" to="/trains">{{
$t('app.trains')
}}</router-link>
/ /
<router-link <router-link
class="route" class="route"
@@ -61,65 +63,44 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { useStore } from '../../store/store'; import { useMainStore } from '../../store/mainStore';
import options from '../../data/options.json';
import imageMixin from '../../mixins/imageMixin';
import SelectBox from '../Global/SelectBox.vue';
import StatusIndicator from './StatusIndicator.vue'; import StatusIndicator from './StatusIndicator.vue';
import Clock from './Clock.vue'; import Clock from './Clock.vue';
import RegionDropdown from '../Global/RegionDropdown.vue';
export default defineComponent({ export default defineComponent({
emits: ['changeLang'], emits: ['changeLang'],
mixins: [imageMixin],
props: { props: {
currentLang: { currentLang: {
type: String, type: String,
required: true, required: true
}, }
}, },
setup() { setup() {
return { return {
store: useStore(), store: useMainStore()
}; };
}, },
methods: { methods: {
changeRegion(region: { id: string; value: string }) {
this.store.changeRegion(region);
},
changeLang(lang: string) { changeLang(lang: string) {
this.$emit('changeLang', lang); this.$emit('changeLang', lang);
}, }
}, },
computed: { computed: {
onlineTrainsCount() { onlineTrainsCount() {
return this.store.trainList.filter((train) => train.online).length; return this.store.trainList.filter((train) => train.region == this.store.region.id).length;
}, },
onlineDispatchersCount() { onlineDispatchersCount() {
return this.store.stationList.filter( return this.store.activeSceneryList.filter(
(station) => station.onlineInfo && station.onlineInfo.region == this.store.region.id (scenery) => scenery.region == this.store.region.id && scenery.dispatcherId != -1
).length; ).length;
}, }
factorU() {
return this.onlineDispatchersCount == 0 ? '-' : (this.onlineTrainsCount / this.onlineDispatchersCount).toFixed(2);
},
computedRegions() {
return options.regions.map((region) => {
const regionStationCount =
this.store.apiData.stations?.filter((station) => station.region == region.id && station.isOnline).length || 0;
const regionTrainCount =
this.store.apiData.trains?.filter((train) => train.region == region.id && train.online).length || 0;
return {
id: region.id,
value: `${region.value} <div class='text--grayed'>${regionStationCount} / ${regionTrainCount}</div>`,
selectedValue: region.value,
};
});
},
}, },
components: { SelectBox, StatusIndicator, Clock }, components: { StatusIndicator, Clock, RegionDropdown }
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -215,23 +196,8 @@ export default defineComponent({
} }
} }
// REGION SELECTION
.info_region { .info_region {
color: white;
font-weight: bold;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
.select-box_content button {
background-color: transparent;
font-weight: bold;
padding: 0.1em 0.5em;
color: paleturquoise;
}
.options {
font-size: 0.9em;
}
} }
</style> </style>
+14 -13
View File
@@ -2,32 +2,33 @@
<div class="clock">{{ computedDate }}</div> <div class="clock">{{ computedDate }}</div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { computed, defineComponent, ref } from "vue"; import { computed, defineComponent, ref } from 'vue';
export default defineComponent({ export default defineComponent({
name: "clock", name: 'VueClock',
data: () => ({ data: () => ({
timestamp: Date.now(), timestamp: Date.now()
}), }),
setup() { setup() {
let timestamp = ref(Date.now()); let timestamp = ref(Date.now());
const computedDate = computed(() => new Date(timestamp.value).toLocaleString("pl-PL", { const computedDate = computed(() =>
hour: "2-digit", new Date(timestamp.value).toLocaleString('pl-PL', {
minute: "2-digit", hour: '2-digit',
second: "2-digit", minute: '2-digit',
})); second: '2-digit'
})
);
setInterval(() => (timestamp.value = Date.now()), 1000); setInterval(() => (timestamp.value = Date.now()), 1000);
return { computedDate } return { computedDate };
} }
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../../styles/responsive.scss"; @import '../../styles/responsive.scss';
.clock { .clock {
display: flex; display: flex;
+143 -120
View File
@@ -36,27 +36,39 @@
<circle id="Ellipse 18" cx="15" cy="17" r="7" fill="#393838" /> <circle id="Ellipse 18" cx="15" cy="17" r="7" fill="#393838" />
</g> </g>
<g v-if="greenLight" filter="url(#filter0_d_843_28)"> <g v-if="indicator.lights.greenLight" filter="url(#filter0_d_843_28)">
<circle cx="15" cy="17" r="7" fill="#00FF0A" /> <circle cx="15" cy="17" r="7" fill="#00FF0A" />
</g> </g>
<g v-if="greenBlinkLight" filter="url(#filter0_d_843_28)"> <g v-if="indicator.lights.greenBlinkLight" filter="url(#filter0_d_843_28)">
<circle cx="15" cy="17" r="7" fill="#00FF0A" /> <circle cx="15" cy="17" r="7" fill="#00FF0A" />
<animate attributeType="XML" attributeName="opacity" values="1;0;1" dur="1s" repeatCount="indefinite" /> <animate
attributeType="XML"
attributeName="opacity"
values="1;0;1"
dur="1s"
repeatCount="indefinite"
/>
</g> </g>
<g v-if="redTopLight" filter="url(#filter1_d_843_28)"> <g v-if="indicator.lights.redTopLight" filter="url(#filter1_d_843_28)">
<circle cx="15" cy="36" r="7" fill="#F40000" /> <circle cx="15" cy="36" r="7" fill="#F40000" />
</g> </g>
<g v-if="orangeLight" filter="url(#filter2_d_843_28)"> <g v-if="indicator.lights.orangeLight" filter="url(#filter2_d_843_28)">
<circle cx="15" cy="55" r="7" fill="#FFB800" /> <circle cx="15" cy="55" r="7" fill="#FFB800" />
</g> </g>
<g v-if="redBottomLight" filter="url(#filter3_d_843_28)"> <g v-if="indicator.lights.redBottomLight" filter="url(#filter3_d_843_28)">
<circle cx="15" cy="74" r="7" fill="#F40000" /> <circle cx="15" cy="74" r="7" fill="#F40000" />
<animate attributeType="XML" attributeName="opacity" values="1;0;1" dur="1s" repeatCount="indefinite" /> <animate
attributeType="XML"
attributeName="opacity"
values="1;0;1"
dur="1s"
repeatCount="indefinite"
/>
</g> </g>
</g> </g>
@@ -82,7 +94,12 @@
<feComposite in2="hardAlpha" operator="out" /> <feComposite in2="hardAlpha" operator="out" />
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 1 0 0 0 0 0.04 0 0 0 1 0" /> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 1 0 0 0 0 0.04 0 0 0 1 0" />
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_843_28" /> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_843_28" />
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_843_28" result="shape" /> <feBlend
mode="normal"
in="SourceGraphic"
in2="effect1_dropShadow_843_28"
result="shape"
/>
</filter> </filter>
<filter <filter
id="filter1_d_843_28" id="filter1_d_843_28"
@@ -104,7 +121,12 @@
<feGaussianBlur stdDeviation="2.5" /> <feGaussianBlur stdDeviation="2.5" />
<feColorMatrix type="matrix" values="0 0 0 0 0.770833 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0" /> <feColorMatrix type="matrix" values="0 0 0 0 0.770833 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0" />
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_843_28" /> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_843_28" />
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_843_28" result="shape" /> <feBlend
mode="normal"
in="SourceGraphic"
in2="effect1_dropShadow_843_28"
result="shape"
/>
</filter> </filter>
<filter <filter
id="filter2_d_843_28" id="filter2_d_843_28"
@@ -126,7 +148,12 @@
<feGaussianBlur stdDeviation="2.5" /> <feGaussianBlur stdDeviation="2.5" />
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 0.72 0 0 0 0 0 0 0 0 1 0" /> <feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 0.72 0 0 0 0 0 0 0 0 1 0" />
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_843_28" /> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_843_28" />
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_843_28" result="shape" /> <feBlend
mode="normal"
in="SourceGraphic"
in2="effect1_dropShadow_843_28"
result="shape"
/>
</filter> </filter>
<filter <filter
id="filter3_d_843_28" id="filter3_d_843_28"
@@ -148,13 +175,22 @@
<feGaussianBlur stdDeviation="2.5" /> <feGaussianBlur stdDeviation="2.5" />
<feColorMatrix type="matrix" values="0 0 0 0 0.770833 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0" /> <feColorMatrix type="matrix" values="0 0 0 0 0.770833 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0" />
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_843_28" /> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_843_28" />
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_843_28" result="shape" /> <feBlend
mode="normal"
in="SourceGraphic"
in2="effect1_dropShadow_843_28"
result="shape"
/>
</filter> </filter>
</defs> </defs>
</svg> </svg>
<transition name="tooltip-anim"> <transition name="tooltip-anim">
<div v-html="$t(indicator.message)" class="indicator-tooltip" v-if="tooltipActive"></div> <div
v-html="$t('data-status.' + indicator.message)"
class="indicator-tooltip"
v-if="tooltipActive"
></div>
</transition> </transition>
</div> </div>
</div> </div>
@@ -162,126 +198,114 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { DataStatus } from '../../scripts/enums/DataStatus'; import { Status } from '../../typings/common';
import { useStore } from '../../store/store'; import { useApiStore } from '../../store/apiStore';
import { StoreState } from '../../scripts/interfaces/store/storeTypes'; import { APIDataStatus } from '../../typings/api';
interface Indicator {
// status: Status.Data;
message: string;
lights: {
greenLight: boolean;
greenBlinkLight: boolean;
redTopLight: boolean;
orangeLight: boolean;
redBottomLight: boolean;
};
}
export default defineComponent({ export default defineComponent({
data() { data() {
return { return {
tooltipActive: false, tooltipActive: false,
indicator: { apiStore: useApiStore()
offline: false,
status: DataStatus.Loading,
message: 'data-status.S3',
},
greenLight: false,
greenBlinkLight: false,
redTopLight: false,
orangeLight: false,
redBottomLight: false,
}; };
}, },
mounted() {
this.setSignalStatus(DataStatus.Loading);
},
setup() {
const store = useStore();
return {
dataStatus: store.dataStatuses,
store,
};
},
watch: {
dataStatus: {
deep: true,
handler(statuses: StoreState['dataStatuses']) {
const connectionStatus = statuses.connection;
const sceneryDataStatus = statuses.sceneries;
const trainsDataStatus = statuses.trains;
const dispatcherDataStatus = statuses.dispatchers;
if (this.store.isOffline) {
this.setSignalStatus(DataStatus.Initialized);
this.indicator.status = DataStatus.Initialized;
this.indicator.message = 'data-status.S1-offline';
return;
}
if (connectionStatus == DataStatus.Error) {
this.setSignalStatus(connectionStatus);
this.indicator.status = connectionStatus;
this.indicator.message = 'data-status.S1a-connection';
return;
}
if (sceneryDataStatus == DataStatus.Error) {
this.setSignalStatus(sceneryDataStatus);
this.indicator.status = sceneryDataStatus;
this.indicator.message = 'data-status.S1a-sceneries';
return;
}
if (trainsDataStatus == DataStatus.Warning) {
this.setSignalStatus(trainsDataStatus);
this.indicator.status = trainsDataStatus;
this.indicator.message = 'data-status.S5-trains';
return;
}
if (dispatcherDataStatus == DataStatus.Warning) {
this.setSignalStatus(dispatcherDataStatus);
this.indicator.status = dispatcherDataStatus;
this.indicator.message = 'data-status.S5-dispatchers';
return;
}
if (sceneryDataStatus == DataStatus.Loaded) {
this.setSignalStatus(DataStatus.Loaded);
this.indicator.status = DataStatus.Loaded;
this.indicator.message = 'data-status.S2';
}
},
},
},
methods: { methods: {
setSignalStatus(status: DataStatus) { setLights(message: string) {
this.greenLight = false; let lights = {
this.greenBlinkLight = false; greenBlinkLight: false,
this.redTopLight = false; greenLight: false,
this.orangeLight = false; orangeLight: false,
this.redBottomLight = false; redBottomLight: false,
redTopLight: false
};
if (status == DataStatus.Initialized) { switch (message) {
this.redTopLight = true; case 'S3':
lights.greenBlinkLight = true;
break;
case 'S2':
lights.greenLight = true;
break;
case 'S1-offline':
lights.redTopLight = true;
break;
case 'S1a-connection':
case 'S1a-sceneries':
lights.redTopLight = true;
lights.redBottomLight = true;
break;
case 'S5-dispatchers':
case 'S5-trains':
lights.orangeLight = true;
break;
default:
break;
} }
if (status == DataStatus.Loaded) { return lights;
this.greenLight = true; }
}
if (status == DataStatus.Warning) {
this.orangeLight = true;
}
if (status == DataStatus.Error) {
this.redTopLight = true;
this.redBottomLight = true;
}
if (status == DataStatus.Loading) {
this.greenBlinkLight = true;
}
},
}, },
computed: {
indicator(): Indicator {
const dataStatuses = this.apiStore.dataStatuses;
const swdrStatuses = this.apiStore.activeData?.apiStatuses;
let message = 'S3';
switch (dataStatuses.connection) {
case Status.Data.Loading:
message = 'S3';
break;
case Status.Data.Loaded:
message = 'S2';
break;
case Status.Data.Offline:
message = 'S1-offline';
break;
case Status.Data.Error:
message = 'S1a-connection';
break;
default:
break;
}
if (swdrStatuses?.dispatchersAPI == APIDataStatus.WARNING) {
message = 'S5-dispatchers';
}
if (swdrStatuses?.trainsAPI == APIDataStatus.WARNING) {
message = 'S5-trains';
}
if (swdrStatuses?.stationsAPI == APIDataStatus.WARNING) {
message = 'S1a-sceneries';
}
return {
lights: this.setLights(message),
message
};
}
}
}); });
</script> </script>
@@ -375,4 +399,3 @@ export default defineComponent({
} }
} }
</style> </style>
+123
View File
@@ -0,0 +1,123 @@
<template>
<Card :is-open="isUpdateCardOpen" @toggle-card="toggleCard(false)">
<div class="content">
<h1 style="margin-bottom: 0.5em">🚀 {{ $t('update.title') }}</h1>
<div class="features-body" v-if="htmlChangelog != ''" v-html="htmlChangelog"></div>
<div class="no-features" v-else>{{ $t('update.no-data') }}</div>
<button class="btn btn--action" ref="confirm-btn" @click="toggleCard(false)">
{{ $t('update.confirm') }}
</button>
<p class="bottom-info">
{{ $t('update.info-1') }}
<br />
<span v-html="$t('update.info-2')"></span>
</p>
</div>
</Card>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { useMainStore } from '../../store/mainStore';
import { version } from '../../../package.json';
import { Converter } from 'showdown';
import Card from '../Global/Card.vue';
const converter = new Converter();
export default defineComponent({
components: { Card },
props: {
isUpdateCardOpen: {
type: Boolean,
required: true
}
},
emits: ['toggleCard'],
data() {
return {
mainStore: useMainStore(),
version: version
};
},
watch: {
isUpdateCardOpen(val: boolean) {
this.$nextTick(() => {
if (val) (this.$refs['confirm-btn'] as HTMLElement).focus();
});
}
},
computed: {
htmlChangelog() {
if (this.mainStore.appUpdate == null) return '';
return converter.makeHtml(this.mainStore.appUpdate.changelog);
}
},
methods: {
toggleCard(value: boolean) {
this.$emit('toggleCard', value);
}
}
});
</script>
<style lang="scss" scoped>
@import '../../styles/variables';
::v-deep(h1) {
text-align: center;
color: $accentCol;
}
::v-deep(h2) {
padding: 0.25em 0;
border-bottom: 1px solid #aaa;
}
::v-deep(ul) {
list-style: initial;
padding: 1em;
line-height: 1.5em;
}
.content {
display: grid;
grid-template-rows: auto 1fr auto;
gap: 0.5em;
padding: 1em;
min-height: 700px;
overflow: auto;
text-align: justify;
max-width: 700px;
}
.no-features {
text-align: center;
}
button {
margin: 0 auto;
padding: 0.5em 0.75em;
font-size: 1.1em;
}
p.bottom-info {
text-align: center;
color: #ccc;
}
a {
text-decoration: underline;
}
</style>
-168
View File
@@ -1,168 +0,0 @@
<template>
<transition name="modal-anim">
<section class="update-modal card" v-if="releaseData && modalOpen">
<h2 class="modal_header text--primary">
<img :src="getImage('stacjownik-header-logo.svg')" alt="stacjownik logo" />
{{ releaseData.tag_name }}
</h2>
<div class="horizontal"></div>
<div class="modal_content">
<h3>{{ $t('update.title') }}</h3>
<a :href="releaseData.html_url" target="_blank">{{ $t('update.release-link') }}</a>
<br />
<br />
<p>{{ $t('update.paragraph1') }}</p>
<!-- <div class="modal_changelog" v-html="markdownReleaseBody"></div> -->
</div>
<div class="modal_actions">
<button class="btn btn--option" @click="modalOpen = false">{{ $t('update.confirm-button') }}</button>
</div>
</section>
</transition>
</template>
<script lang="ts">
import axios from 'axios';
import { defineComponent } from 'vue';
import packageInfo from '../../../package.json';
import imageMixin from '../../mixins/imageMixin';
import { ReleaseAPIData } from '../../scripts/interfaces/github_api/ReleaseAPIData';
import StorageManager from '../../scripts/managers/storageManager';
import { useStore } from '../../store/store';
const GH_LASTEST_RELEASE_URL = 'https://api.github.com/repos/Spythere/stacjownik/releases/latest';
export default defineComponent({
mixins: [imageMixin],
mounted() {
this.fetchReleases();
},
data() {
return {
modalOpen: false,
releaseData: null as ReleaseAPIData | null,
};
},
setup() {
return {
store: useStore()
}
},
methods: {
async fetchReleases() {
const storedVersion = StorageManager.getStringValue('appVersion');
const appVersion = packageInfo.version;
// Zmiana
if (appVersion != storedVersion) {
StorageManager.setStringValue('appVersion', appVersion);
// Znajdź changelog na GitHubie, jeśli jest pokaż modal
try {
const releaseData: ReleaseAPIData = await (await axios.get(GH_LASTEST_RELEASE_URL)).data;
if (!releaseData) return;
const lastReleaseVersion = releaseData.tag_name.slice(1);
if (lastReleaseVersion == appVersion) {
this.releaseData = releaseData;
this.modalOpen = true;
StorageManager.setStringValue('releaseURL', releaseData.html_url);
}
} catch (error) {
console.error(`Wystąpił błąd podczas pobierania danych z API GitHuba: ${error}`);
}
}
},
},
});
</script>
<style lang="scss" scoped>
@import '../../styles/card.scss';
@import '../../styles/responsive.scss';
.modal-anim {
&-enter-active,
&-leave-active {
transition: all $animDuration $animType;
}
&-enter-from,
&-leave-to {
opacity: 0;
transform: translate(-50%, -50%) scale(0.45);
}
}
.update-modal {
text-align: center;
background-color: var(--clr-secondary);
padding: 1em;
}
.horizontal {
margin: 1em 0;
height: 2px;
width: 100%;
background-color: white;
}
.modal_header {
font-size: 1.6em;
img {
width: 50%;
vertical-align: text-top;
}
}
.modal_content {
font-size: 1.1em;
a {
text-decoration: underline;
}
}
.modal_actions {
margin-top: 2em;
button {
color: white;
padding: 0.5em;
font-size: 1.2em;
background-color: black;
}
}
.modal_changelog {
font-size: 0.8em;
margin-top: 2em;
}
@include smallScreen {
.update-modal {
height: auto;
max-width: 95%;
}
}
</style>
-69
View File
@@ -1,69 +0,0 @@
<template>
<div class="update-prompt">
<transition name="prompt-anim">
<div class="prompt_content" v-if="!hidePrompt && needRefresh">
<div>{{ $t('update.title') }}</div>
<div class="prompt_actions">
<button class="btn btn--filled" @click="updateServiceWorker(true)">{{ $t('update.confirm-button') }}</button>
<button class="btn btn--filled" @click="hidePrompt = true">{{ $t('update.later-button') }}</button>
</div>
</div>
</transition>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import useCustomSW from '../../mixins/useCustomSW';
const hidePrompt = ref(false);
const { needRefresh, updateServiceWorker } = useCustomSW();
</script>
<style lang="scss" scoped>
@import '../../styles/variables.scss';
.update-prompt {
position: fixed;
bottom: 0;
right: 0;
z-index: 200;
}
.prompt_content {
margin: 1em;
padding: 1em;
font-weight: bold;
background-color: black;
box-shadow: 0 0 10px 1px $accentCol;
border-radius: 1em;
}
.prompt_actions {
display: flex;
margin-top: 1em;
gap: 0.5em;
button {
width: 100%;
}
}
// Animation
.prompt-anim {
&-enter-active,
&-leave-active {
transition: all 120ms ease-in;
transform: translateY(0);
}
&-enter-from,
&-leave-to {
transform: translateY(100%);
}
}
</style>
+3 -3
View File
@@ -7,14 +7,14 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from "vue"; import { defineComponent } from 'vue';
export default defineComponent({}); export default defineComponent({});
</script> </script>
<style lang="scss"> <style lang="scss">
@import "../../styles/variables"; @import '../../styles/variables';
@import "../../styles/responsive"; @import '../../styles/responsive';
.button_content { .button_content {
display: flex; display: flex;
+6 -6
View File
@@ -15,18 +15,18 @@ export default defineComponent({
props: { props: {
scrollNoMoreData: { scrollNoMoreData: {
type: Boolean, type: Boolean,
required: true, required: true
}, },
scrollDataLoaded: { scrollDataLoaded: {
type: Boolean, type: Boolean,
required: true, required: true
}, },
list: { list: {
type: Array as PropType<any[]>, type: Array as PropType<any[]>,
required: true, required: true
}, }
}, },
emits: ['addHistoryData'], emits: ['addHistoryData'],
@@ -34,8 +34,8 @@ export default defineComponent({
methods: { methods: {
addHistoryData() { addHistoryData() {
this.$emit('addHistoryData'); this.$emit('addHistoryData');
}, }
}, }
}); });
</script> </script>
+93
View File
@@ -0,0 +1,93 @@
<template>
<transition name="modal-anim" tag="div">
<div class="card" v-if="isOpen">
<div class="card-background" @click="toggleCard(false)"></div>
<div class="card-body" tabindex="0">
<slot></slot>
</div>
</div>
</transition>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { useMainStore } from '../../store/mainStore';
export default defineComponent({
emits: ['toggleCard'],
props: {
isOpen: Boolean
},
data() {
return {
store: useMainStore()
};
},
watch: {
isOpen(v) {
this.$nextTick(() => {
if (v == false) (this.store.modalLastClickedTarget as HTMLElement)?.focus();
});
}
},
methods: {
toggleCard(value: boolean) {
this.$emit('toggleCard', value);
}
}
});
</script>
<style lang="scss" scoped>
@import '../../styles/responsive.scss';
.card {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 200;
display: flex;
justify-content: center;
align-items: center;
}
.card-background {
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
cursor: pointer;
background-color: rgba(0, 0, 0, 0.55);
}
.card-body {
position: relative;
margin: 1em;
max-height: 95vh;
max-height: 95dvh;
background-color: #1a1a1a;
box-shadow: 0 0 15px 10px #0e0e0e;
overflow: auto;
}
@include smallScreen {
.card {
align-items: flex-start;
}
}
</style>
+256
View File
@@ -0,0 +1,256 @@
<template>
<Card :isOpen="isCardOpen" @toggleCard="toggleCard" @keydown.esc="toggleCard(false)">
<div class="body">
<div class="content">
<h1 v-html="$t('donations.header')"></h1>
<div class="donators-slider" v-if="donatorList.length != 0">
<span v-html="$t('donations.donator-title', { count: donatorList.length })"></span>
<transition mode="out-in" name="slider-anim" class="current-name">
<span :key="displayingName">
<img src="/images/icon-diamond.svg" alt="donator diamond icon" />
{{ displayingName }}
</span>
</transition>
</div>
<br />
<p v-html="$t('donations.p1')"></p>
<br />
<i18n-t keypath="donations.p2" tag="p">
<template v-slot:b1>
<b>{{ $t('donations.p2-b1') }}</b>
</template>
<template v-slot:b2>
<b>{{ $t('donations.p2-b2') }}</b>
</template>
<template v-slot:b3>
<b>{{ $t('donations.p2-b3') }}</b>
</template>
<template v-slot:link>
<a class="discord" href="https://discord.gg/x2mpNN3svk" target="_blank">
{{ $t('donations.p2-a1') }}
</a>
</template>
</i18n-t>
<br />
<p v-html="$t('donations.p3')"></p>
<br />
<i18n-t keypath="donations.p4" tag="p">
<template v-slot:img>
<img src="/images/icon-diamond.svg" alt="donator diamond icon" />
</template>
<template v-slot:b1>
<b>{{ $t('donations.p4-b1') }}</b>
</template>
<template v-slot:b2>
<b>{{ $t('donations.p4-b2') }}</b>
</template>
</i18n-t>
<br />
<i
v-html="$t('donations.p5')"
style="display: flex; justify-content: flex-end; text-align: right"
>
</i>
</div>
<div class="actions">
<a
class="action a-button btn--image coffee"
href="https://buycoffee.to/spythere"
target="_blank"
ref="action"
>
<img src="/images/icon-coffee.png" width="20" alt="buycoffee.to donation" />
{{ $t('donations.action-buycoffee') }}
</a>
<a
class="action a-button btn--image paypal"
href="https://www.paypal.com/donate/?hosted_button_id=EDB3SKFAHXFTW"
target="_blank"
>
<img src="/images/icon-dollar.svg" alt="paypal donation" />
{{ $t('donations.action-paypal') }}
</a>
<button class="action btn--image exit" @click="toggleCard(false)">
<img src="/images/icon-exit.svg" alt="dollar donation icon" />
{{ $t('donations.action-exit') }}
</button>
</div>
</div>
</Card>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { useApiStore } from '../../store/apiStore';
import Card from './Card.vue';
export default defineComponent({
components: { Card },
props: {
isCardOpen: Boolean
},
emits: ['toggleCard'],
watch: {
isCardOpen(val: boolean) {
this.running = val;
this.lastUpdate = Date.now();
this.$nextTick(() => {
if (val) (this.$refs['action'] as HTMLElement).focus();
});
}
},
created() {
this.runUpdate();
},
data() {
return {
apiStore: useApiStore(),
displayingIndex: 0,
lastUpdate: 0,
running: false
};
},
computed: {
displayingName() {
return this.donatorList[this.displayingIndex];
},
donatorList() {
return this.apiStore.donatorsData.slice().sort(() => Math.sign(Math.random() * -2 + 1));
}
},
methods: {
toggleCard(value: boolean) {
this.$emit('toggleCard', value);
},
runUpdate() {
if (Date.now() >= this.lastUpdate + 2000 && this.running) {
this.displayingIndex = (this.displayingIndex + 1) % this.donatorList.length;
this.lastUpdate = Date.now();
}
window.requestAnimationFrame(this.runUpdate);
}
}
});
</script>
<style lang="scss" scoped>
@import '../../styles/responsive.scss';
.body {
display: grid;
grid-template-rows: 1fr auto;
gap: 1em;
font-size: 1.1em;
max-width: 820px;
}
.content {
overflow: auto;
overflow-x: hidden;
padding: 1em;
}
img {
max-height: 20px;
margin-right: 5px;
vertical-align: text-bottom;
}
h1 {
font-size: 1.95em;
text-align: center;
}
p {
text-align: justify;
}
a.discord {
text-decoration: underline;
}
.actions {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 0.5em;
padding: 1em;
form button {
width: 100%;
}
}
.actions > .action {
&.paypal {
$btnColor: #254069;
background-color: $btnColor;
&:hover {
background-color: lighten($btnColor, 5%);
}
}
&.coffee {
$btnColor: #009255;
background-color: $btnColor;
&:hover {
background-color: lighten($btnColor, 5%);
}
}
&.exit {
$btnColor: #686868;
background-color: $btnColor;
&:hover {
background-color: lighten($btnColor, 5%);
}
}
}
.donators-slider {
text-align: center;
line-height: 30px;
.current-name {
backface-visibility: hidden;
display: block;
font-weight: bold;
word-wrap: break-word;
color: var(--clr-donator);
}
}
.slider-anim {
&-move,
&-enter-active,
&-leave-active {
transition: all 150ms ease-in-out;
}
&-enter-from,
&-leave-to {
opacity: 0;
}
}
</style>
+1 -1
View File
@@ -12,7 +12,7 @@ import { defineComponent } from 'vue';
export default defineComponent({ export default defineComponent({
setup() { setup() {
return {}; return {};
}, }
}); });
</script> </script>
+9 -6
View File
@@ -1,7 +1,10 @@
<template> <template>
<div class="progress-bar"> <div class="progress-bar">
<span class="bar-bg"></span> <span class="bar-bg"></span>
<span class="bar-fg" :style="{ width: `${~~progressPercent}%`, backgroundColor: bgColor }"></span> <span
class="bar-fg"
:style="{ width: `${~~progressPercent}%`, backgroundColor: bgColor }"
></span>
</div> </div>
</template> </template>
@@ -12,12 +15,12 @@ export default defineComponent({
props: { props: {
progressPercent: { progressPercent: {
type: Number, type: Number,
required: true, required: true
}, },
progressType: { progressType: {
type: String, type: String,
required: false, required: false
}, }
}, },
computed: { computed: {
@@ -29,8 +32,8 @@ export default defineComponent({
default: default:
return 'springgreen'; return 'springgreen';
} }
}, }
}, }
}); });
</script> </script>
+231
View File
@@ -0,0 +1,231 @@
<template>
<div class="region-dropdown" v-click-outside="clickedOutside">
<div class="content">
<button class="selected-region" @click="toggleBox">
<span>{{ selectedItem.name }}</span>
<img :src="`/images/icon-arrow-${listOpen ? 'asc' : 'desc'}.svg`" alt="Arrow icon" />
</button>
<ul class="options">
<li class="option" v-for="(item, i) in regionList" :key="item.id">
<transition
name="unfold"
:style="`
--delay-in: ${i * 55}ms;
--delay-out: ${(regionList.length - 1 - i) * 55}ms`"
>
<label :for="item.id" v-if="listOpen">
<input type="button" :id="item.id" name="select-box" @click="selectOption(item)" />
<span :style="selectedItem.id == item.id ? 'color: gold;' : ''" v-html="item.value">
</span>
</label>
</transition>
</li>
</ul>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent, Ref, ref } from 'vue';
import { regions as regionsJSON } from '../../data/options.json';
import { useMainStore } from '../../store/mainStore';
interface Item {
id: string;
value: string;
name: string;
}
export default defineComponent({
data() {
return {
store: useMainStore(),
selectedItemIndex: 0,
listOpen: false
};
},
setup() {
let buttonRef: Ref<HTMLButtonElement | null> = ref(null);
return {
buttonRef
};
},
watch: {
'store.region.id': {
handler(regionId) {
this.selectedItemIndex = this.regionList.findIndex((reg) => reg.id == regionId);
}
},
'$route.query.region': {
immediate: true,
handler(regionQuery: string) {
if (regionQuery) {
this.store.region =
regionsJSON.find(
(reg) =>
reg.id == regionQuery.toLocaleLowerCase() ||
reg.value.toLocaleLowerCase() == regionQuery.toLocaleLowerCase()
) ?? regionsJSON[0];
}
}
}
},
computed: {
selectedItem() {
return this.regionList[this.selectedItemIndex] || null;
},
regionList() {
return regionsJSON.map((region) => {
const regionStationCount = this.store.activeSceneryList.filter(
(scenery) => scenery.region == region.id && scenery.dispatcherId != -1
).length;
const regionTrainCount =
this.store.trainList.filter((train) => train.region == region.id).length || 0;
return {
id: region.id,
value: `${region.value} <div class='text--grayed'>${regionStationCount} / ${regionTrainCount}</div>`,
name: region.name
};
});
}
},
methods: {
selectOption(selectedRegion: Item) {
this.store.region = selectedRegion;
this.listOpen = false;
},
toggleBox(e: Event) {
this.listOpen = !this.listOpen;
if (!this.listOpen) (e.target as HTMLButtonElement).blur();
},
clickedOutside() {
this.listOpen = false;
this.buttonRef?.blur();
}
}
});
</script>
<style lang="scss" scoped>
@import '../../styles/variables.scss';
.region-dropdown {
display: flex;
align-items: center;
justify-content: space-between;
}
button img {
vertical-align: middle;
width: 1.35em;
}
button.selected-region {
display: flex;
justify-content: space-between;
color: paleturquoise;
font-weight: bold;
&:focus {
background-color: #262626;
}
}
.content {
position: relative;
margin: 0 auto;
font-weight: bold;
height: 100%;
text-align: center;
}
ul.options {
position: absolute;
top: 100%;
left: 0;
height: auto;
z-index: 100;
width: 100%;
font-size: 0.9em;
}
li.option {
input {
position: absolute;
top: 0;
left: 0;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none;
outline: none;
background: none;
&:focus + span {
color: $accentCol;
font-weight: 800;
}
}
&:last-child label {
border-radius: 0 0 1em 1em;
}
label {
width: 100%;
padding: 0.5em 0;
position: relative;
display: inline-block;
background-color: #262626f2;
&:hover,
&:focus {
background-color: #333333f2;
}
cursor: pointer;
}
}
.unfold {
&-enter-from,
&-leave-to {
opacity: 0;
transform: translateY(-10px) scale(0.85);
}
&-enter-active,
&-leave-active {
transition: all 110ms ease-out;
}
&-enter-active {
transition-delay: var(--delay-in);
}
&-leave-active {
transition-delay: var(--delay-out);
}
}
</style>
+16 -24
View File
@@ -7,39 +7,31 @@
@keypress="updateValue" @keypress="updateValue"
/> />
<img <img class="search-exit" src="/images/icon-exit.svg" alt="exit-icon" @click="clearSearchValue" />
class="search-exit"
:src="getIcon('exit')"
alt="exit-icon"
@click="clearValue"
/>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, watch } from "vue"; import { defineComponent, ref, watch } from 'vue';
import imageMixin from "../../mixins/imageMixin";
export default defineComponent({ export default defineComponent({
mixins: [imageMixin], emits: ['update:searchedValue', 'clearValue'],
emits: ["update:searchedValue", "clearValue"],
props: { props: {
searchedValue: { searchedValue: {
type: String, type: String,
required: true, required: true
}, },
updateOnInput: { updateOnInput: {
type: Boolean, type: Boolean,
default: true, default: true
}, },
titleToTranslate: { titleToTranslate: {
type: String, type: String,
required: true, required: true
}, },
clearValue: { clearValue: {
type: Function, type: Function
}, }
}, },
setup(props, { emit }) { setup(props, { emit }) {
@@ -49,32 +41,32 @@ export default defineComponent({
watch( watch(
() => compSearchedValue.value, () => compSearchedValue.value,
(value) => { (value) => {
emit("update:searchedValue", value); emit('update:searchedValue', value);
} }
); );
} }
const clearValue = () => { const clearSearchValue = () => {
compSearchedValue.value = ""; compSearchedValue.value = '';
emit("clearValue"); emit('clearValue');
}; };
const updateValue = (e: any) => { const updateValue = (e: any) => {
if (!props.updateOnInput && e.keyCode == 13) if (!props.updateOnInput && e.keyCode == 13)
emit("update:searchedValue", compSearchedValue.value); emit('update:searchedValue', compSearchedValue.value);
}; };
return { return {
compSearchedValue, compSearchedValue,
updateValue, updateValue,
clearValue, clearSearchValue
}; };
}, }
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../../styles/responsive"; @import '../../styles/responsive';
.search { .search {
&-box { &-box {
-217
View File
@@ -1,217 +0,0 @@
<template>
<div class="select-box">
<div class="select-box_content">
<button class="selected" @click="toggleBox">
<span>{{ computedSelectedItem.selectedValue || computedSelectedItem.value }}</span>
<div class="arrow">
<img :src="listOpen ? getIcon('arrow-asc') : getIcon('arrow-desc')" alt="arrow-icon" />
</div>
</button>
<ul class="options" :ref="(el) => (listRef = el as Element)">
<li class="option" v-for="(item, i) in itemList" :key="item.id">
<transition
name="unfold"
:style="`
--delay-in: ${i * 55}ms;
--delay-out: ${(itemList.length - 1 - i) * 55}ms`"
>
<label :for="item.id" v-if="listOpen">
<input type="button" :id="item.id" name="select-box" @click="selectOption(item)" />
<span :style="computedSelectedItem.id == item.id ? 'color: gold;' : ''" v-html="item.value"> </span>
</label>
</transition>
</li>
</ul>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent, Ref, ref, computed } from 'vue';
import imageMixin from '../../mixins/imageMixin';
interface Item {
id: string;
value: string;
selectedValue?: string;
}
export default defineComponent({
emits: ['selected'],
mixins: [imageMixin],
props: {
itemList: {
type: Array as () => Item[],
required: true,
},
defaultItemIndex: {
type: Number,
default: 0,
},
prefix: {
type: String,
default: '',
},
},
setup(props) {
let listRef: Ref<Element | null> = ref(null);
let buttonRef: Ref<HTMLButtonElement | null> = ref(null);
let activeEl: Ref<Element | null> = ref(document.activeElement);
let listOpen = ref(false);
let selectedItem: Ref<Item> = ref(props.itemList[props.defaultItemIndex]);
const computedSelectedItem = computed(() => {
return props.itemList.find((item) => item.id === selectedItem.value.id) || props.itemList[props.defaultItemIndex];
});
return {
computedSelectedItem,
listOpen,
selectedItem,
listRef,
buttonRef,
activeEl,
};
},
methods: {
selectOption(item: Item) {
this.selectedItem = item;
this.listOpen = false;
this.$emit('selected', item);
},
toggleBox(e: Event) {
this.listOpen = !this.listOpen;
if (!this.listOpen) (e.target as HTMLButtonElement).blur();
},
clickedOutside() {
this.listOpen = false;
this.buttonRef?.blur();
},
},
});
</script>
<style lang="scss" scoped>
@import '../../styles/variables.scss';
.unfold {
&-enter-from,
&-leave-to {
opacity: 0;
transform: translateY(-10px) scale(0.85);
}
&-enter-active,
&-leave-active {
transition: all 110ms ease-out;
}
&-enter-active {
transition-delay: var(--delay-in);
}
&-leave-active {
transition-delay: var(--delay-out);
}
}
.select-box {
display: flex;
align-items: center;
}
.arrow {
img {
vertical-align: middle;
width: 1.35em;
}
}
button.selected {
color: paleturquoise;
font-weight: bold;
padding: 0.1em 0.5em;
&:focus {
background-color: #262626;
}
}
.select-box_content {
position: relative;
margin: 0 auto;
height: 100%;
text-align: center;
}
ul.options {
position: absolute;
top: 100%;
left: 0;
height: auto;
z-index: 100;
width: 100%;
font-size: 0.9em;
}
li.option {
input {
position: absolute;
top: 0;
left: 0;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none;
outline: none;
background: none;
&:focus + span {
color: $accentCol;
font-weight: 800;
}
}
&:last-child label {
border-radius: 0 0 1em 1em;
}
label {
position: relative;
display: inline-block;
background-color: #262626f2;
&:hover,
&:focus {
background-color: #333333f2;
}
padding: 0.5em 0;
width: 100%;
cursor: pointer;
}
}
</style>
+63 -16
View File
@@ -1,7 +1,11 @@
<template> <template>
<span class="status-badge" :class="statusID" v-if="isOnline"> <span class="status-badge" :class="statusName" v-if="isOnline">
{{ $t(`status.${statusID}`) }} {{ $t(`status.${statusName}`) }}
{{ statusID == 'online' ? timestampToString(statusTimestamp!) : '' }} {{
statusName == 'online' && dispatcherStatus && dispatcherStatus > 5
? timestampToString(dispatcherStatus)
: ''
}}
</span> </span>
<span class="status-badge free" v-else> <span class="status-badge free" v-else>
@@ -10,22 +14,64 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { PropType, defineComponent } from 'vue';
import dateMixin from '../../mixins/dateMixin'; import dateMixin from '../../mixins/dateMixin';
import { Status } from '../../typings/common';
export default defineComponent({ export default defineComponent({
props: { props: {
statusID: { dispatcherStatus: {
type: String, type: Number as PropType<Status.ActiveDispatcher | number>
}, },
statusTimestamp: { dispatcherTimestamp: {
type: Number, type: Number as PropType<number | null>
}, },
isOnline: { isOnline: {
type: Boolean, type: Boolean
}, }
}, },
mixins: [dateMixin], mixins: [dateMixin],
computed: {
statusName() {
if (this.dispatcherStatus === undefined) return 'free';
switch (this.dispatcherStatus) {
case Status.ActiveDispatcher.AFK:
return 'afk';
case Status.ActiveDispatcher.NO_LIMIT:
return 'no-limit';
case Status.ActiveDispatcher.ENDING:
return 'ending';
case Status.ActiveDispatcher.INVALID:
return 'invalid';
case Status.ActiveDispatcher.NOT_LOGGED_IN:
return 'not-signed';
case Status.ActiveDispatcher.NO_SPACE:
return 'no-space';
case Status.ActiveDispatcher.UNAVAILABLE:
return 'unavailable';
case Status.ActiveDispatcher.UNKNOWN:
return 'unknown';
case Status.ActiveDispatcher.FREE:
return 'free';
default:
if (this.dispatcherTimestamp != null && this.dispatcherStatus >= Date.now() + 25500000)
return 'no-limit';
return 'online';
}
}
}
}); });
</script> </script>
@@ -34,13 +80,13 @@ $free: #8a8a8a;
$ending: #e6c300; $ending: #e6c300;
$no-limit: #117fc9; $no-limit: #117fc9;
$unav: #ff3d5d; $unav: #ff3d5d;
$brb: #e6a100; $afk: #e6a100;
$no-space: #222; $no-space: #222;
$online: #09a116; $online: #09a116;
$unknown: rgb(185, 60, 60); $unknown: #b93c3c;
.status-badge { .status-badge {
border-radius: 1rem; border-radius: 1em;
font-weight: 500; font-weight: 500;
padding: 0.2em 0.55em; padding: 0.2em 0.55em;
@@ -69,8 +115,8 @@ $unknown: rgb(185, 60, 60);
font-size: 0.85em; font-size: 0.85em;
} }
&.brb { &.afk {
background-color: $brb; background-color: $afk;
color: black; color: black;
font-size: 0.95em; font-size: 0.95em;
} }
@@ -82,7 +128,8 @@ $unknown: rgb(185, 60, 60);
font-size: 0.85em; font-size: 0.85em;
} }
&.unknown { &.unknown,
&.invalid {
background-color: $unknown; background-color: $unknown;
font-size: 0.95em; font-size: 0.95em;
} }
+99 -26
View File
@@ -1,36 +1,83 @@
<template> <template>
<div class="stock-list"> <div class="stock-list">
<ul> <div v-if="tractionOnly">
<li v-for="(stockName, i) in trainStockList"> <p>
<p>{{ stockName.split(':')[0].split('_').splice(0, 2).join(' ') }} {{ stockName.split(':')[1] }}</p> {{ computedStockList[0].split(':')[0].split('_').splice(0, 2).join(' ') }}
{{ computedStockList[0].split(':')[1] }}
</p>
<img
class="traction-only"
:src="
getVehicleThumbnailURL(
computedStockList[0].split(':')[0],
/^EN/.test(computedStockList[0]) ? 'rb' : ''
)
"
@error="onImageError($event, computedStockList[0])"
width="300"
height="60"
/>
</div>
<ul v-else>
<li v-for="(stockName, i) in computedStockList" :key="i">
<p>
{{ stockName.split(':')[0].split('_').splice(0, 2).join(' ') }}
{{ stockName.split(':')[1] }}
</p>
<span> <span>
<img <img
:src="`https://rj.td2.info.pl/dist/img/thumbnails/${stockName.split(':')[0]}${/^EN/.test(stockName) ? 'rb' : ''}.png`" :data-mouseover="stockName"
data-tooltip-type="VehiclePreviewTooltip"
:data-tooltip-content="stockName.split(':')[0]"
:src="
getVehicleThumbnailURL(stockName.split(':')[0], /^EN/.test(stockName) ? 'rb' : '')
"
@error="onImageError($event, stockName)" @error="onImageError($event, stockName)"
@click.stop="() => {}"
width="400" width="400"
height="60" height="60"
/> />
<!-- /// Manualne dodawanie miniaturek członów dla kibelków /// -->
<img <img
:data-mouseover="stockName"
data-tooltip-type="VehiclePreviewTooltip"
:data-tooltip-content="stockName.split(':')[0]"
v-if="/^(EN|2EN)/.test(stockName)" v-if="/^(EN|2EN)/.test(stockName)"
:src="`https://rj.td2.info.pl/dist/img/thumbnails/${stockName.split(':')[0]}s.png`" :src="getVehicleThumbnailURL(stockName, 's')"
@error="(event) => ((event.target as HTMLImageElement).src = '/images/icon-loco-ezt-s.png')" @error="
(event) => ((event.target as HTMLImageElement).src = '/images/icon-loco-ezt-s.png')
"
@click.stop="() => {}"
/> />
<img <img
class="train-thumbnail" :data-mouseover="stockName"
data-tooltip-type="VehiclePreviewTooltip"
:data-tooltip-content="stockName.split(':')[0]"
v-if="/^EN71/.test(stockName)" v-if="/^EN71/.test(stockName)"
:src="`https://rj.td2.info.pl/dist/img/thumbnails/${stockName.split(':')[0]}s.png`" :src="getVehicleThumbnailURL(stockName, 's')"
@error="(event) => ((event.target as HTMLImageElement).src = '/images/icon-loco-ezt-s.png')" @error="
(event) => ((event.target as HTMLImageElement).src = '/images/icon-loco-ezt-s.png')
"
@click.stop="() => {}"
/> />
<img <img
class="train-thumbnail" :data-mouseover="stockName"
data-tooltip-type="VehiclePreviewTooltip"
:data-tooltip-content="stockName.split(':')[0]"
v-if="/^(EN|2EN)/.test(stockName)" v-if="/^(EN|2EN)/.test(stockName)"
:src="`https://rj.td2.info.pl/dist/img/thumbnails/${stockName.split(':')[0]}ra.png`" :src="getVehicleThumbnailURL(stockName, 'ra')"
@error="(event) => ((event.target as HTMLImageElement).src = '/images/icon-loco-ezt-ra.png')" @error="
(event) => ((event.target as HTMLImageElement).src = '/images/icon-loco-ezt-ra.png')
"
@click.stop="() => {}"
/> />
<!-- /// -->
</span> </span>
</li> </li>
</ul> </ul>
@@ -39,36 +86,57 @@
<script lang="ts"> <script lang="ts">
import { PropType, defineComponent } from 'vue'; import { PropType, defineComponent } from 'vue';
import { useStore } from '../../store/store'; import { useApiStore } from '../../store/apiStore';
import { RollingStockInfo } from '../../scripts/interfaces/github_api/StockInfoGithubData';
import imageMixin from '../../mixins/imageMixin';
export default defineComponent({ export default defineComponent({
mixins: [imageMixin],
props: { props: {
trainStockList: { trainStockList: {
type: Array as PropType<string[]>, type: Array as PropType<string[]>,
required: true, required: true
}, },
tractionOnly: {
type: Boolean,
required: false
}
}, },
data() { data() {
return { return {
store: useStore(), apiStore: useApiStore()
}; };
}, },
computed: {
computedStockList() {
return this.tractionOnly ? this.trainStockList.slice(0, 1) : this.trainStockList;
}
},
methods: { methods: {
getVehicleThumbnailURL(locoType: string, suffix?: string) {
return `https://static.spythere.eu/thumbnails/${locoType}${suffix}.png`;
},
onImageError(event: Event, stockName: string) { onImageError(event: Event, stockName: string) {
const fallbackName = let fallbackName = '';
Object.keys(this.store.rollingStockData!.info).find((type) => {
return this.store.rollingStockData!.info[type as keyof RollingStockInfo].find((v) => v[0] === stockName.split(':')[0]); const isLoco = /.-\d{3}/.test(stockName);
}) || 'vehicle-unknown';
if (isLoco) {
if (/^\d?EN\d{2}/.test(stockName)) fallbackName = 'loco-ezt';
else if (/^SN\d{2}/.test(stockName)) fallbackName = 'loco-szt';
else if (/^\d{0,}?E/.test(stockName)) fallbackName = 'loco-e';
else fallbackName = 'loco-s';
} else {
const isCarPassenger = /(\d{3}a|(Bau|Gor)\d{2}|304C)_/.test(stockName);
fallbackName += 'car-';
fallbackName += isCarPassenger ? 'passenger' : 'cargo';
}
(event.target as HTMLImageElement).src = `/images/icon-${fallbackName}.png`; (event.target as HTMLImageElement).src = `/images/icon-${fallbackName}.png`;
}, }
}, }
}); });
</script> </script>
@@ -89,6 +157,7 @@ export default defineComponent({
ul > li > span { ul > li > span {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
cursor: crosshair;
} }
img { img {
@@ -97,10 +166,14 @@ img {
height: auto; height: auto;
} }
img.traction-only {
max-width: 100%;
}
p { p {
text-align: center; text-align: center;
color: #aaa; color: #aaa;
font-size: 0.9em; font-size: 0.95em;
margin-bottom: 1em; margin-bottom: 1em;
} }
</style> </style>
-119
View File
@@ -1,119 +0,0 @@
<template>
<span class="stop-date">
<span
class="date arrival"
v-if="!stop.beginsHere"
:class="{
delayed: stop.arrivalDelay > 0 && (stop.confirmed || stop.stopped),
preponed: stop.arrivalDelay < 0 && (stop.confirmed || stop.stopped),
'on-time': stop.arrivalDelay == 0 && stop.confirmed,
}"
>
<span v-if="stop.arrivalDelay != 0 && (stop.confirmed || stop.stopped)">
<s>{{ timestampToString(stop.arrivalTimestamp) }}</s>
{{ timestampToString(stop.arrivalRealTimestamp) }}
({{ stop.arrivalDelay > 0 ? '+' : '' }}{{ stop.arrivalDelay }})
</span>
<span v-else>
{{ timestampToString(stop.arrivalTimestamp) }}
</span>
</span>
<span class="date stop" v-if="stop.stopTime || stop.stopped" :class="stop.stopType.replace(', ', '-')">
{{ stop.stopTime }} {{ stop.stopType == '' ? 'pt' : stop.stopType }}
</span>
<span
class="date departure"
v-if="!stop.terminatesHere && (stop.stopTime != 0 || stop.stopped)"
:class="{
delayed: stop.departureDelay > 0 && stop.confirmed,
preponed: stop.departureDelay < 0 && stop.confirmed,
}"
>
<span v-if="stop.departureDelay != 0 && stop.confirmed">
<s>{{ timestampToString(stop.departureTimestamp) }}</s>
{{ timestampToString(stop.departureRealTimestamp) }}
({{ stop.departureDelay > 0 ? '+' : '' }}{{ stop.departureDelay }})
</span>
<span v-else>
{{ timestampToString(stop.departureTimestamp) }}
</span>
</span>
</span>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import dateMixin from '../../mixins/dateMixin';
import TrainStop from '../../scripts/interfaces/TrainStop';
export default defineComponent({
mixins: [dateMixin],
props: {
stop: {
type: Object as () => TrainStop,
required: true,
},
},
setup() {
return {};
},
});
</script>
<style lang="scss" scoped>
$preponedClr: lime;
$delayedClr: salmon;
$dateClr: #525151;
$stopExchangeClr: #db8e29;
$stopDefaultClr: #252525;
.stop-date {
display: flex;
align-items: center;
.date {
background: $dateClr;
padding: 0.3em 0.5em;
}
.stop {
&.ph,
&.ph-pm,
&.pm {
background: $stopExchangeClr;
}
background: $stopDefaultClr;
}
.arrival,
.departure {
&.delayed {
s {
color: #999;
}
span {
color: $delayedClr;
}
}
&.preponed {
s {
color: #999;
}
span {
color: $preponedClr;
}
}
}
}
</style>
-152
View File
@@ -1,152 +0,0 @@
<template>
<div class="train-modal" v-if="chosenTrain" @keydown.esc="closeModal">
<div class="modal_background" @click="closeModal"></div>
<div class="modal_content" ref="content" tabindex="0">
<button class="btn exit" @click="closeModal">
<img :src="getIcon('exit')" alt="close card" />
</button>
<TrainInfo :train="chosenTrain" :extended="false" ref="trainInfo" />
<TrainSchedule :train="chosenTrain" tabindex="0" />
</div>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import imageMixin from '../../mixins/imageMixin';
import modalTrainMixin from '../../mixins/modalTrainMixin';
import trainInfoMixin from '../../mixins/trainInfoMixin';
import { useStore } from '../../store/store';
import TrainInfo from '../TrainsView/TrainInfo.vue';
import TrainSchedule from '../TrainsView/TrainSchedule.vue';
export default defineComponent({
components: { TrainInfo, TrainSchedule },
mixins: [trainInfoMixin, modalTrainMixin, imageMixin],
data() {
return {
isTopBarVisible: false,
};
},
setup() {
const store = useStore();
return {
store,
};
},
activated() {
const contentEl = this.$refs['content'] as HTMLElement;
this.$nextTick(() => {
contentEl.focus();
});
},
methods: {
handleContentScroll(e: Event) {
const trainInfoCompHeight: number = (this.$refs['trainInfo'] as any).$el.getBoundingClientRect().height;
const posTop = (e.target as HTMLElement).scrollTop;
this.isTopBarVisible = posTop > trainInfoCompHeight;
},
},
});
</script>
<style lang="scss" scoped>
@import '../../styles/responsive.scss';
@import '../../styles/card.scss';
.top-info-bar-anim {
&-enter-active,
&-leave-active {
transition: all 150ms ease-in-out;
}
&-enter-from,
&-leave-to {
transform: translate(-50%, -50%) scale(0.8);
opacity: 0;
}
}
.exit {
position: absolute;
top: 0;
right: 0;
margin: 0.5em 1em;
padding: 0.25em;
z-index: 201;
img {
width: 1.5rem;
vertical-align: middle;
}
}
.train-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
color: white;
z-index: 200;
display: flex;
justify-content: center;
text-align: left;
}
.modal_background {
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
cursor: pointer;
background-color: rgba(0, 0, 0, 0.55);
}
.modal_content {
position: relative;
overflow-y: scroll;
margin-top: 1em;
width: 95vw;
max-height: 96vh;
background-color: #1a1a1a;
box-shadow: 0 0 15px 10px #0e0e0e;
}
@include midScreen {
.exit {
margin: 0.5em;
img {
width: 1.75rem;
}
}
}
@include smallScreen {
.modal_content {
max-height: 85vh;
}
}
</style>

Some files were not shown because too many files have changed in this diff Show More