From 5adb99036175e82e8dc9428af322656617e1f894 Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 6 Sep 2020 21:55:55 +0200 Subject: [PATCH] =?UTF-8?q?Poprawki=20kodu.=20Dodano=20interaktywno=C5=9B?= =?UTF-8?q?=C4=87=20rozk=C5=82ad=C3=B3w=20jazdy.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icon-unavailable.svg | 6 + src/components/StationsView/FilterCard.vue | 17 ++- src/components/StationsView/StationCard.vue | 79 ++++++++---- src/components/StationsView/StationTable.vue | 7 +- src/components/TrainsView/TrainSearch.vue | 13 +- src/data/stations.json | 125 ++++++++++++++++++- src/router/index.ts | 27 ++-- src/styles/global.scss | 8 +- src/styles/responsive.scss | 4 +- src/views/StationsView.vue | 1 + src/views/TrainsView.vue | 10 +- 11 files changed, 236 insertions(+), 61 deletions(-) create mode 100644 src/assets/icon-unavailable.svg diff --git a/src/assets/icon-unavailable.svg b/src/assets/icon-unavailable.svg new file mode 100644 index 0000000..7a1d3fd --- /dev/null +++ b/src/assets/icon-unavailable.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/StationsView/FilterCard.vue b/src/components/StationsView/FilterCard.vue index b893d0f..8420c10 100644 --- a/src/components/StationsView/FilterCard.vue +++ b/src/components/StationsView/FilterCard.vue @@ -166,23 +166,19 @@ export default class FilterCard extends Vue { @include smallScreen() { width: 85vw; - font-size: 0.45em; + font-size: calc(0.3em + 1vw); + } + + @include bigScreen { + font-size: 1.1rem; } } .card { &-exit { - position: absolute; - top: 0; - right: 0; - - margin: 0.8em; - img { - width: 1.1em; + width: 1.2em; } - - cursor: pointer; } &-title { @@ -191,6 +187,7 @@ export default class FilterCard extends Vue { color: $accentCol; margin: 0.5em 0; + margin-top: 1em; } &-options { diff --git a/src/components/StationsView/StationCard.vue b/src/components/StationsView/StationCard.vue index 657885d..44638c8 100644 --- a/src/components/StationsView/StationCard.vue +++ b/src/components/StationsView/StationCard.vue @@ -68,6 +68,13 @@ alt="non-public" title="Sceneria niepubliczna" /> + + icon-unavailable
@@ -142,18 +149,30 @@
-
{{stationInfo.stationName.toUpperCase()}}
-
AKTYWNE ROZKŁADY JAZDY
+
{{stationInfo.stationName.toUpperCase()}}
+
AKTYWNE ROZKŁADY JAZDY
- - {{timetable.category}} - {{timetable.trainNo}} + + + + {{timetable.category}} + {{timetable.trainNo}} + + | + + {{ timetable.driverName }} + - {{timetable.driverName}} + {{station.stationName}} @@ -329,4 +329,9 @@ export default class StationTable extends styleMixin { } } } + +.station-unavailable { + color: #ff1e1e; + font-weight: bold; +} \ No newline at end of file diff --git a/src/components/TrainsView/TrainSearch.vue b/src/components/TrainsView/TrainSearch.vue index 6f349da..272fe87 100644 --- a/src/components/TrainsView/TrainSearch.vue +++ b/src/components/TrainsView/TrainSearch.vue @@ -19,7 +19,7 @@ diff --git a/src/data/stations.json b/src/data/stations.json index 428c16e..18d1b9b 100644 --- a/src/data/stations.json +++ b/src/data/stations.json @@ -1,5 +1,4 @@ -[ - { +[{ "stationName": "Blaszki", "stationURL": "https://td2.info.pl/scenerie/blaszki/", "stationLines": "", @@ -1739,5 +1738,125 @@ }, "default": false, "nonPublic": false + }, + { + "stationName": "Hetmanice", + "stationURL": "https://td2.info.pl/dzial-trenerski/hetmanice-stacja-dla-poczatkujacych/", + "stationLines": "", + "reqLevel": "0", + "supportersOnly": "NIE", + "signalType": "współczesna", + "controlType": "SCS-SPK", + "SBL": "", + "twoWayBlock": "", + "routes": { + "oneWay": { + "catenary": 0, + "noCatenary": 0 + }, + "twoWay": { + "catenary": 2, + "noCatenary": 0 + } + }, + "default": false, + "nonPublic": false, + "unavailable": true + }, + { + "stationName": "Starzynki", + "stationURL": "https://td2.info.pl/w-trakcie-prac/starzynki/", + "stationLines": "", + "reqLevel": "3", + "supportersOnly": "NIE", + "signalType": "współczesna", + "controlType": "SPK", + "SBL": "TAK (Szlak Ps)", + "twoWayBlock": "TAK", + "routes": { + "oneWay": { + "catenary": 2, + "noCatenary": 0 + }, + "twoWay": { + "catenary": 1, + "noCatenary": 0 + } + }, + "default": false, + "nonPublic": false, + "unavailable": true + }, + { + "stationName": "Głęboszów", + "stationURL": "https://td2.info.pl/scenerie/gleboszow/", + "stationLines": "", + "reqLevel": "3", + "supportersOnly": "NIE", + "signalType": "współczesna", + "controlType": "SCS", + "SBL": "TAK (Szlaki Br oraz GO)", + "twoWayBlock": "TAK", + "routes": { + "oneWay": { + "catenary": 1, + "noCatenary": 0 + }, + "twoWay": { + "catenary": 2, + "noCatenary": 0 + } + }, + "default": false, + "nonPublic": false, + "unavailable": true + }, + { + "stationName": "Skawce", + "stationURL": "https://td2.info.pl/w-trakcie-prac/skawce-(projekt-zakopianka)/", + "stationLines": "97", + "reqLevel": "4", + "supportersOnly": "NIE", + "signalType": "współczesna", + "controlType": "SPK", + "SBL": "", + "twoWayBlock": "", + "routes": { + "oneWay": { + "catenary": 2, + "noCatenary": 0 + }, + "twoWay": { + "catenary": 0, + "noCatenary": 0 + } + }, + "default": false, + "nonPublic": false, + "unavailable": true + }, + { + "stationName": "Sroka", + "stationURL": "https://td2.info.pl/w-trakcie-prac/podg-sroka/", + "stationLines": "", + "reqLevel": "8", + "supportersOnly": "NIE", + "signalType": "współczesna", + "controlType": "SCS", + "SBL": "", + "twoWayBlock": "TAK", + "routes": { + "oneWay": { + "catenary": 1, + "noCatenary": 0 + }, + "twoWay": { + "catenary": 3, + "noCatenary": 0 + } + }, + "default": false, + "nonPublic": false, + "unavailable": true } -] +] \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index be642a1..8464264 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,10 +1,10 @@ -import Vue from 'vue' -import VueRouter, { RouteConfig } from 'vue-router' +import Vue from 'vue'; +import VueRouter, { RouteConfig } from 'vue-router'; -import StationsView from '../views/StationsView.vue' -import TrainsView from '../views/TrainsView.vue' +import StationsView from '../views/StationsView.vue'; +import TrainsView from '../views/TrainsView.vue'; -Vue.use(VueRouter) +Vue.use(VueRouter); const routes: Array = [ { @@ -13,16 +13,17 @@ const routes: Array = [ component: StationsView, }, { - path: "/trains", - name: "TrainsView", - component: TrainsView - } -] + path: '/trains', + name: 'TrainsView', + component: TrainsView, + props: true, + }, +]; const router = new VueRouter({ mode: 'history', base: process.env.BASE_URL, - routes -}) + routes, +}); -export default router +export default router; diff --git a/src/styles/global.scss b/src/styles/global.scss index 76c3fc8..15c4d53 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -137,14 +137,18 @@ input { width: 95%; } + @include bigScreen { + font-size: 1.4rem; + } + &-exit { position: absolute; top: 0; right: 0; - margin: 0.8em; + margin: 0.3em 0em; img { - width: 1.5em; + width: 1.6em; } cursor: pointer; diff --git a/src/styles/responsive.scss b/src/styles/responsive.scss index 8573682..6f87bd8 100644 --- a/src/styles/responsive.scss +++ b/src/styles/responsive.scss @@ -5,7 +5,7 @@ } @mixin bigScreen() { - @media only screen and (min-width: 1600px) { + @media only screen and (min-width: 2000px) { @content; } -} +} \ No newline at end of file diff --git a/src/views/StationsView.vue b/src/views/StationsView.vue index 5dadb92..8ea4bd2 100644 --- a/src/views/StationsView.vue +++ b/src/views/StationsView.vue @@ -149,6 +149,7 @@ export default class StationsView extends Vue { acc[station.stationName].push({ trainNo: train.trainNo, driverName: train.driverName, + driverId: train.driverId, category: train.category, ...foundStop }); diff --git a/src/views/TrainsView.vue b/src/views/TrainsView.vue index 698f679..c5f604e 100644 --- a/src/views/TrainsView.vue +++ b/src/views/TrainsView.vue @@ -6,6 +6,7 @@
@@ -17,7 +18,7 @@