From 42f84643cc317cc176be309fc74c227c9df3cd76 Mon Sep 17 00:00:00 2001 From: Spythere Date: Thu, 5 Nov 2020 01:15:12 +0100 Subject: [PATCH] =?UTF-8?q?Zmiany=20w=20wygl=C4=85dzie=20listy=20poci?= =?UTF-8?q?=C4=85g=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 +- src/components/StationsView/FilterCard.vue | 39 +++-- src/components/StationsView/StationCard.vue | 64 +------ .../StationsView/StationTimetable.vue | 5 +- src/components/TrainsView/TrainSorter.vue | 8 +- src/components/TrainsView/TrainStats.vue | 2 +- src/components/TrainsView/TrainTable.vue | 165 ++++++++++-------- src/scripts/interfaces/Station.ts | 3 + src/scripts/interfaces/Train.ts | 3 + src/store/store.ts | 25 ++- src/styles/global.scss | 44 +++++ src/styles/user_badge.scss | 48 +++++ src/views/TrainsView.vue | 5 +- 13 files changed, 258 insertions(+), 157 deletions(-) create mode 100644 src/styles/user_badge.scss diff --git a/src/App.vue b/src/App.vue index 5731d7d..2d735b2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -39,9 +39,7 @@ - + diff --git a/src/components/StationsView/FilterCard.vue b/src/components/StationsView/FilterCard.vue index 5dfdad1..9dc2e64 100644 --- a/src/components/StationsView/FilterCard.vue +++ b/src/components/StationsView/FilterCard.vue @@ -21,7 +21,8 @@ {{option.content}} + >{{ option.content }} @@ -39,17 +40,24 @@ @change="handleInput" /> - {{slider.value}} + {{ slider.value }} -
{{slider.content}}
+
{{ slider.content }}
-
+
@@ -161,7 +169,8 @@ export default class FilterCard extends Vue { background: #262a2e; - font-size: calc(0.75rem + 0.4vw); + font-size: calc(0.75rem + 0.45vw); + box-shadow: 0 0 15px 5px #474747; @include smallScreen() { @@ -175,12 +184,6 @@ export default class FilterCard extends Vue { } .card { - &-exit { - img { - width: 1.2em; - } - } - &-title { font-size: 2em; font-weight: 700; @@ -217,6 +220,12 @@ export default class FilterCard extends Vue { font-size: 0.9em; } } + + &-exit { + img { + width: 2em; + } + } } .option { @@ -248,6 +257,10 @@ export default class FilterCard extends Vue { transition: all 0.2s; + &.save { + font-size: 0.8em; + } + &:not(.checked) { background-color: #585858; diff --git a/src/components/StationsView/StationCard.vue b/src/components/StationsView/StationCard.vue index b7f9499..903c54f 100644 --- a/src/components/StationsView/StationCard.vue +++ b/src/components/StationsView/StationCard.vue @@ -137,7 +137,7 @@

GRACZE NA STACJI

@@ -202,28 +202,9 @@ export default class StationCard extends styleMixin { : `${this.stationInfo.dispatcherExp}`; } - get computedScheduledTrains() { - return this.stationInfo.scheduledTrains.map(scheduledTrain => { - let stopStatus = ""; - let stopLabel = ""; - - if (scheduledTrain.stopInfo.terminatesHere && scheduledTrain.stopInfo.confirmed) { stopStatus = "terminated"; stopLabel = "Skończył bieg" } - else if (!scheduledTrain.stopInfo.terminatesHere && scheduledTrain.stopInfo.confirmed) { stopStatus = "departed"; stopLabel = "Odprawiony" } - else if (scheduledTrain.currentStationName == this.stationInfo.stationName && !scheduledTrain.stopInfo.stopped) { stopStatus = "online"; stopLabel = "Na stacji" } - else if (scheduledTrain.currentStationName == this.stationInfo.stationName && scheduledTrain.stopInfo.stopped) { stopStatus = "stopped"; stopLabel = "Postój" } - else if (scheduledTrain.currentStationName != this.stationInfo.stationName) { stopStatus = "arriving"; stopLabel = "W drodze" } - - return { - ...scheduledTrain, - stopStatus, - stopLabel - } - }) - } - get computedStationTrains() { return this.stationInfo.stationTrains.map(stationTrain => { - const scheduledData = this.computedScheduledTrains.find(scheduledTrain => scheduledTrain.trainNo === stationTrain.trainNo); + const scheduledData = this.stationInfo.scheduledTrains.find(scheduledTrain => scheduledTrain.trainNo === stationTrain.trainNo); return { ...stationTrain, @@ -237,6 +218,7 @@ export default class StationCard extends styleMixin {