From 6c1e00d002fd16ce40d653b92ec6b97ca4b34387 Mon Sep 17 00:00:00 2001 From: Spythere Date: Tue, 4 Jun 2024 15:57:17 +0200 Subject: [PATCH] chore: layout & design fixes --- src/components/StationsView/StationTable.vue | 538 +++++++++---------- src/router/index.ts | 2 +- src/views/SceneryView.vue | 17 +- 3 files changed, 274 insertions(+), 283 deletions(-) diff --git a/src/components/StationsView/StationTable.vue b/src/components/StationsView/StationTable.vue index b06478e..9ee51e3 100644 --- a/src/components/StationsView/StationTable.vue +++ b/src/components/StationsView/StationTable.vue @@ -4,302 +4,299 @@ v-if="apiStore.dataStatuses.connection == Status.Loading && filteredStationList.length == 0" /> -
- - - - - - - - - - - + + + + +
-
- - + + - + + - + + + + - + + + + + + - - - {{ station.generalInfo.routes.doubleOtherNames.length }} - - - - - - SUP (RASP-UZK) + - icon-unknown - - - + {{ $t(`controls.abbrevs.${station.generalInfo.controlType}`) }} + - + - + SUP (RASP-UZK) - + dSAT ASDEK - + icon-unknown + - - - -
- -
- - sort icon -
-
- - - - sort icon - -
- - {{ - station.generalInfo.project - }} - {{ station.name }} - - - - {{ station.generalInfo.reqLevel >= 2 ? station.generalInfo.reqLevel : 'L' }} - - - - non-public - - - - non-public - - - - unavailable - - - - ? - - - - - - - {{ station.onlineInfo.dispatcherName }} - + + + -
- {{ station.onlineInfo.dispatcherName }} -
-
- + sort icon + +
+
+ {{ + station.generalInfo.project + }} + {{ station.name }} + + -1 && + station.generalInfo.availability != 'nonPublic' && + station.generalInfo.availability != 'unavailable' " + :style="calculateExpStyle(station.generalInfo.reqLevel)" > - {{ station.onlineInfo.dispatcherExp < 2 ? 'L' : station.onlineInfo.dispatcherExp }} + {{ station.generalInfo.reqLevel >= 2 ? station.generalInfo.reqLevel : 'L' }} - -
- - {{ station.generalInfo.routes.singleElectrifiedNames.length }} - + + non-public + - - {{ station.generalInfo.routes.singleOtherNames.length }} - + + non-public + + + + unavailable + + + + ? +
+ + + + + + {{ station.onlineInfo.dispatcherName }} + + +
+ {{ station.onlineInfo.dispatcherName }}
-
-
- - {{ station.generalInfo.routes.doubleElectrifiedNames.length }} - +
+ + {{ station.onlineInfo.dispatcherExp < 2 ? 'L' : station.onlineInfo.dispatcherExp }} + + + +
- {{ $t(`controls.abbrevs.${station.generalInfo.controlType}`) }} + {{ station.generalInfo.routes.singleElectrifiedNames.length }} - + + {{ station.generalInfo.routes.singleOtherNames.length }} + +
+
+
+ + {{ station.generalInfo.routes.doubleElectrifiedNames.length }} + - dSAT ASDEK + + {{ station.generalInfo.routes.doubleOtherNames.length }} + +
+
+ - {{ - station.onlineInfo?.stationTrains?.length ?? '-' - }} - / - {{ station.onlineInfo?.maxUsers ?? '-' }} - - {{ station.onlineInfo?.dispatcherRate ?? '-' }} - - {{ station.onlineInfo?.spawns.length ?? '-' }} - - {{ station.onlineInfo?.scheduledTrainCount.all ?? '-' }} - - {{ station.onlineInfo?.scheduledTrainCount.unconfirmed ?? '-' }} - - {{ station.onlineInfo?.scheduledTrainCount.confirmed ?? '-' }} -
-
+ + {{ + station.onlineInfo?.stationTrains?.length ?? '-' + }} + / + {{ station.onlineInfo?.maxUsers ?? '-' }} + + + + {{ station.onlineInfo?.dispatcherRate ?? '-' }} + + + + {{ station.onlineInfo?.spawns.length ?? '-' }} + + + + {{ station.onlineInfo?.scheduledTrainCount.all ?? '-' }} + + + + {{ station.onlineInfo?.scheduledTrainCount.unconfirmed ?? '-' }} + + + + {{ station.onlineInfo?.scheduledTrainCount.confirmed ?? '-' }} + + + +
@@ -415,12 +412,15 @@ export default defineComponent({ @import '../../styles/icons.scss'; $rowCol: #424242; +$tableBgCol: #555555; .station_table { height: 80vh; min-height: 700px; - overflow: auto; + overflow-y: scroll; + overflow-x: auto; font-weight: 500; + background-color: $tableBgCol; } .no-stations { diff --git a/src/router/index.ts b/src/router/index.ts index d6f337f..95d4000 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -58,7 +58,7 @@ const routes: Array = [ const router = createRouter({ scrollBehavior(to, from, savedPosition) { if (to.name == 'SceneryView' && from.name !== to.name && from.query['view'] === undefined) - return { el: `.app_main` }; + return { el: `.app_main`, top: -15 }; if (savedPosition) return savedPosition; }, diff --git a/src/views/SceneryView.vue b/src/views/SceneryView.vue index 11501f0..e75adf2 100644 --- a/src/views/SceneryView.vue +++ b/src/views/SceneryView.vue @@ -121,10 +121,6 @@ export default defineComponent({ Status: Status.Data }), - // activated() { - // this.loadSelectedCheckpoint(); - // }, - setup() { const route = useRoute(); @@ -215,11 +211,10 @@ button.back-btn { position: relative; - width: 100%; max-width: var(--max-container-width); - min-height: 100vh; + width: 100%; - margin: 1rem 0; + padding: 1rem 0; text-align: center; &[data-timetable-only='true'] { @@ -233,9 +228,7 @@ button.back-btn { background-color: #181818; padding: 1em 0.5em; - height: 100vh; - min-height: 750px; - max-height: 1000px; + height: calc(100vh - 0.5em); overflow: auto; display: flex; @@ -246,9 +239,7 @@ button.back-btn { background: #181818; padding: 1em 0.5em; - height: 100vh; - min-height: 750px; - max-height: 1000px; + height: calc(100vh - 0.5em); display: grid; grid-template-rows: auto 1fr auto;