From 7b4da9d42201571abe82f79896a8acf1109d6972 Mon Sep 17 00:00:00 2001 From: Spythere Date: Fri, 10 Nov 2023 16:18:06 +0100 Subject: [PATCH] poprawki layoutu aplikacji --- src/App.scss | 23 +++----- src/App.vue | 2 +- src/components/StationsView/StationTable.vue | 3 +- src/components/TrainsView/TrainInfo.vue | 4 -- src/components/TrainsView/TrainOptions.vue | 3 -- src/components/TrainsView/TrainTable.vue | 56 ++++++++++---------- src/styles/filters_options.scss | 3 +- src/views/TrainsView.vue | 2 +- 8 files changed, 43 insertions(+), 53 deletions(-) diff --git a/src/App.scss b/src/App.scss index e47fae8..f97f853 100644 --- a/src/App.scss +++ b/src/App.scss @@ -56,24 +56,17 @@ // CONTAINER .app_container { - display: flex; - flex-flow: column; + // display: flex; + // flex-flow: column; + display: grid; + grid-template-rows: auto 1fr auto; + grid-template-columns: 100%; min-height: 100vh; +} - header { - flex: 0 0 auto; - } - - main { - flex: 1 1 auto; - - padding: 0 0.5em; - } - - footer { - flex: 0 1 0.2em; - } +.app_main { + padding: 0 0.5em; } .warning { diff --git a/src/App.vue b/src/App.vue index 15d25e8..9957d50 100644 --- a/src/App.vue +++ b/src/App.vue @@ -72,7 +72,7 @@ export default defineComponent({ window.addEventListener('offline', () => { this.store.isOffline = true; - this.store.activeData.sceneries = []; + this.store.activeData.activeSceneries = []; this.store.activeData.trains = []; this.store.activeData.connectedSocketCount = 0; diff --git a/src/components/StationsView/StationTable.vue b/src/components/StationsView/StationTable.vue index ee3dd2e..f0d811a 100644 --- a/src/components/StationsView/StationTable.vue +++ b/src/components/StationsView/StationTable.vue @@ -388,7 +388,8 @@ section.station_table { table { white-space: nowrap; border-collapse: collapse; - min-width: 1350px; + // min-width: 1350px; + width: 100%; @include smallScreen() { min-width: auto; diff --git a/src/components/TrainsView/TrainInfo.vue b/src/components/TrainsView/TrainInfo.vue index 2f1bcca..8e3c7f2 100644 --- a/src/components/TrainsView/TrainInfo.vue +++ b/src/components/TrainsView/TrainInfo.vue @@ -246,10 +246,6 @@ export default defineComponent({ font-size: 1.15em; } - .train-stats { - font-size: 1.1em; - } - .general-info, .general-status, .general-timetable { diff --git a/src/components/TrainsView/TrainOptions.vue b/src/components/TrainsView/TrainOptions.vue index 2e1a81c..3aa431a 100644 --- a/src/components/TrainsView/TrainOptions.vue +++ b/src/components/TrainsView/TrainOptions.vue @@ -159,9 +159,6 @@ export default defineComponent({ }, onFilterChange(filter: TrainFilter) { - // if (this.lastSelectedFilter?.id === filter.id) - // this.trainFilterList.forEach((tf) => (tf.isActive = filter.id === tf.id)); - filter.isActive = !filter.isActive; this.lastSelectedFilter = filter; }, diff --git a/src/components/TrainsView/TrainTable.vue b/src/components/TrainsView/TrainTable.vue index 267b71d..23b8505 100644 --- a/src/components/TrainsView/TrainTable.vue +++ b/src/components/TrainsView/TrainTable.vue @@ -1,34 +1,31 @@ @@ -104,6 +101,10 @@ export default defineComponent({ } } +.train-table { + position: relative; +} + .table-info { text-align: center; @@ -149,6 +150,7 @@ img.train-image { .train { &-list { position: relative; + overflow-y: hidden; @include smallScreen() { width: 100%; diff --git a/src/styles/filters_options.scss b/src/styles/filters_options.scss index 3fd0976..5ca21ca 100644 --- a/src/styles/filters_options.scss +++ b/src/styles/filters_options.scss @@ -4,6 +4,7 @@ .filters-options { margin-bottom: 0.5em; + position: relative; } .actions-bar { @@ -57,7 +58,7 @@ h1.option-title { background-color: $bgCol; box-shadow: 0 5px 10px 2px #0f0f0f; - width: 97%; + width: 100%; max-width: 550px; padding: 1em; diff --git a/src/views/TrainsView.vue b/src/views/TrainsView.vue index 6c2791d..ad34b78 100644 --- a/src/views/TrainsView.vue +++ b/src/views/TrainsView.vue @@ -113,7 +113,7 @@ export default defineComponent({ @import '../styles/responsive.scss'; .trains-view { - min-height: 100%; + min-height: 600px; position: relative; }