From 328e8c0573af1d173072ca9be7b5893cd9956f06 Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 13 May 2024 14:54:21 +0200 Subject: [PATCH 01/78] chore: fixed stock fallback thumbnnail --- src/components/Global/StockList.vue | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/Global/StockList.vue b/src/components/Global/StockList.vue index 6058fec..dbb0980 100644 --- a/src/components/Global/StockList.vue +++ b/src/components/Global/StockList.vue @@ -116,14 +116,10 @@ export default defineComponent({ const isLoco = /.-\d{3}/.test(stockName); if (isLoco) { - fallbackName += 'loco-'; - fallbackName += /^\d?EN\d{2}/.test(stockName) - ? 'ezt' - : /^SN\d{2}/.test(stockName) - ? 'szt' - : /^\d?E/.test(stockName) - ? 'e' - : 's'; + if (/^\d?EN\d{2}/.test(stockName)) fallbackName = 'loco-ezt'; + else if (/^SN\d{2}/.test(stockName)) fallbackName = 'loco-szt'; + else if (/^\d{1,}?E/.test(stockName)) fallbackName = 'loco-e'; + else fallbackName = 'loco-s'; } else { const isCarPassenger = /(\d{3}a|(Bau|Gor)\d{2}|304C)_/.test(stockName); From eb5b94c9f6a3bcc5d30acf3dfe9a45d3a3e96c4c Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 13 May 2024 15:02:15 +0200 Subject: [PATCH 02/78] chore: vehicle images hotfixes --- src/components/Global/StockList.vue | 2 +- src/components/Tooltip/VehiclePreviewTooltip.vue | 14 +++++++++++++- vite.config.ts | 8 -------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/components/Global/StockList.vue b/src/components/Global/StockList.vue index dbb0980..a2fbecc 100644 --- a/src/components/Global/StockList.vue +++ b/src/components/Global/StockList.vue @@ -118,7 +118,7 @@ export default defineComponent({ 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{1,}?E/.test(stockName)) fallbackName = 'loco-e'; + 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); diff --git a/src/components/Tooltip/VehiclePreviewTooltip.vue b/src/components/Tooltip/VehiclePreviewTooltip.vue index 95bce86..1d88c19 100644 --- a/src/components/Tooltip/VehiclePreviewTooltip.vue +++ b/src/components/Tooltip/VehiclePreviewTooltip.vue @@ -16,7 +16,9 @@ :src="`https://static.spythere.eu/images/${tooltipStore.content}--300px.jpg`" /> -
+
+ +
{{ tooltipStore.content.replace(/_/g, ' ') }}
@@ -38,6 +40,12 @@ export default defineComponent({ this.imageState = 'loading'; }, + watch: { + 'tooltipStore.type'(prev, val) { + if (prev != val) this.imageState = 'loading'; + } + }, + methods: { onImageLoad() { this.imageState = 'loaded'; @@ -80,4 +88,8 @@ img { color: #ccc; text-wrap: wrap; } + +.error-placeholder { + height: 176px; +} diff --git a/vite.config.ts b/vite.config.ts index adf7a9e..58c5daa 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -34,10 +34,6 @@ export default defineConfig({ handler: 'CacheFirst', options: { cacheName: 'swdr-images-cache', - expiration: { - maxEntries: 100, - maxAgeSeconds: 60 * 60 * 24 * 7 // <== 7 days - }, cacheableResponse: { statuses: [0, 200, 404] } @@ -48,10 +44,6 @@ export default defineConfig({ handler: 'CacheFirst', options: { cacheName: 'spythere-images-cache', - expiration: { - maxEntries: 100, - maxAgeSeconds: 60 * 60 * 24 * 7 // <== 7 days - }, cacheableResponse: { statuses: [0, 200] } From e0036bf9698a034a5cb87c06706c89b7bb088102 Mon Sep 17 00:00:00 2001 From: Spythere Date: Wed, 15 May 2024 18:40:42 +0200 Subject: [PATCH 03/78] chore: filters & stats fixes --- src/components/JournalView/JournalOptions.vue | 4 +- .../StationsView/StationFilterCard.vue | 16 ++- src/components/StationsView/StationStats.vue | 130 ++++++++++++------ src/components/StationsView/StationTable.vue | 2 +- src/components/TrainsView/TrainOptions.vue | 4 - src/locales/en.json | 7 +- src/locales/pl.json | 11 +- src/styles/global.scss | 2 - src/views/StationsView.vue | 1 + 9 files changed, 113 insertions(+), 64 deletions(-) diff --git a/src/components/JournalView/JournalOptions.vue b/src/components/JournalView/JournalOptions.vue index d427a21..44a5b90 100644 --- a/src/components/JournalView/JournalOptions.vue +++ b/src/components/JournalView/JournalOptions.vue @@ -301,6 +301,6 @@ export default defineComponent({ diff --git a/src/components/StationsView/StationFilterCard.vue b/src/components/StationsView/StationFilterCard.vue index 344d9da..ced72ed 100644 --- a/src/components/StationsView/StationFilterCard.vue +++ b/src/components/StationsView/StationFilterCard.vue @@ -1,9 +1,9 @@ @@ -27,11 +34,13 @@ @@ -85,10 +118,13 @@ img { .vehicle-name { text-align: center; margin-top: 0.5em; - color: #ccc; text-wrap: wrap; } +.vehicle-props { + color: #ccc; +} + .error-placeholder { height: 176px; } From dbd73d448d3f7253434340dc17343b80ee7dbb3f Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 3 Jun 2024 20:09:15 +0200 Subject: [PATCH 35/78] chore: added active train's rolling stock vmax --- src/App.vue | 1 + src/components/Tooltip/Tooltip.vue | 7 ++--- src/components/TrainsView/TrainInfo.vue | 34 +++++++++++++++++++++++++ src/styles/global.scss | 16 +++++++++--- 4 files changed, 50 insertions(+), 8 deletions(-) diff --git a/src/App.vue b/src/App.vue index 36cf3e5..63d6a30 100644 --- a/src/App.vue +++ b/src/App.vue @@ -226,6 +226,7 @@ export default defineComponent({ min-height: 100vh; overflow: hidden; + position: relative; } .app_main { diff --git a/src/components/Tooltip/Tooltip.vue b/src/components/Tooltip/Tooltip.vue index 0433a4b..060d312 100644 --- a/src/components/Tooltip/Tooltip.vue +++ b/src/components/Tooltip/Tooltip.vue @@ -1,5 +1,5 @@ @@ -35,10 +35,7 @@ export default defineComponent({ let translateX = '0', translateY = '30px'; - if (clientWidth < 500) { - previewEl.style.left = '50%'; - translateX = '-50%'; - } else if (val[0] <= boxWidth / 2) { + if (val[0] <= boxWidth / 2) { previewEl.style.left = '0'; translateX = '0px'; } else if (val[0] >= clientWidth - boxWidth / 2) { diff --git a/src/components/TrainsView/TrainInfo.vue b/src/components/TrainsView/TrainInfo.vue index 66edfb0..eea0c4e 100644 --- a/src/components/TrainsView/TrainInfo.vue +++ b/src/components/TrainsView/TrainInfo.vue @@ -131,6 +131,18 @@
speed icon {{ train.speed }} km/h + + + • + + {{ maxSpeed }} km/h + +
@@ -191,6 +203,28 @@ export default defineComponent({ }; }, + computed: { + maxSpeed() { + return this.train.stockList.reduce((acc, stockName) => { + const stockVehicleInfo = this.apiStore.vehiclesData?.vehicleList.find( + (v) => v[0] == stockName.split(':')[0] + ); + + if (!stockVehicleInfo) return acc; + + const stockVehicleProps = this.apiStore.vehiclesData?.vehicleProps.find( + (v) => v.type == stockVehicleInfo[1] + ); + + if (!stockVehicleProps) return acc; + + if (stockVehicleProps.speed < acc) return stockVehicleProps.speed; + + return acc; + }, Infinity); + } + }, + methods: { navigateToJournal() { this.$router.push({ diff --git a/src/styles/global.scss b/src/styles/global.scss index 12fa47c..9342ec8 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -302,14 +302,15 @@ a.a-button { [data-tooltip]:hover::after, [data-tooltip]:focus::after { position: absolute; - transform: translate(10px, -50%); + transform: translate(0, -50%); content: attr(data-tooltip); color: white; - background-color: #171717; + background-color: #333; + box-shadow: 0 0 5px 2px #aaa; border-radius: 0.5em; padding: 0.5em; - margin: 0 0.25em; + margin: 0 0.5em; max-width: 300px; z-index: 100; } @@ -317,3 +318,12 @@ a.a-button { [data-tooltip] { cursor: help; } + +@include smallScreen { + [data-tooltip]:hover::after, + [data-tooltip]:focus::after { + transform: translate(-50%, 2em); + left: 50%; + width: 100%; + } +} From bdc2ca784c55755f13d2d63336ec5f8b3350b235 Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 3 Jun 2024 21:37:33 +0200 Subject: [PATCH 36/78] chore: missing translations --- src/components/TrainsView/TrainInfo.vue | 2 +- src/locales/en.json | 2 ++ src/locales/pl.json | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/TrainsView/TrainInfo.vue b/src/components/TrainsView/TrainInfo.vue index eea0c4e..7649429 100644 --- a/src/components/TrainsView/TrainInfo.vue +++ b/src/components/TrainsView/TrainInfo.vue @@ -138,7 +138,7 @@ class="text--grayed" style="text-decoration: underline dotted" tabindex="0" - data-tooltip="Maksymalna prędkość na podstawie pojazdów w składzie - nie bierze pod uwagę masy hamowania" + :data-tooltip="$t('trains.vmax-tooltip')" > {{ maxSpeed }} km/h diff --git a/src/locales/en.json b/src/locales/en.json index 465e467..6b34693 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -329,6 +329,8 @@ "current-signal": "at signal", "current-track": "on track", + "vmax-tooltip": "Maximum train speed based on rolling stock vehicles - braked weight is not included", + "delayed": "Delayed: ", "preponed": "Ahead of schedule: ", "on-time": "On time", diff --git a/src/locales/pl.json b/src/locales/pl.json index 1f233b4..4dcf451 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -315,6 +315,8 @@ "current-signal": "przy semaforze", "current-track": "na szlaku", + "vmax-tooltip": "Maksymalna prędkość na podstawie pojazdów w składzie - nie bierze pod uwagę masy hamowania", + "delayed": "Opóźniony: ", "preponed": "Przed czasem: ", "on-time": "Planowo", From 69ff85cfb12bb219ccc2f2847c1d1467ab9c1e69 Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 3 Jun 2024 22:26:58 +0200 Subject: [PATCH 37/78] chore: added route electrification indicators in train schedule --- public/images/icon-w4a.png | Bin 0 -> 3325 bytes src/components/TrainsView/TrainSchedule.vue | 87 ++++++++++++++++---- 2 files changed, 69 insertions(+), 18 deletions(-) create mode 100644 public/images/icon-w4a.png diff --git a/public/images/icon-w4a.png b/public/images/icon-w4a.png new file mode 100644 index 0000000000000000000000000000000000000000..f4700913ddda510e6c8615f7cf629a2faea4ed04 GIT binary patch literal 3325 zcm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2m9tEG%@GOeO=lnqje65^XkHu_Q^yDWzy`ZjRV&)~vYJ zSnerua$*{!ke!Yf7Z(=~xt#`!^z`&3yWPH$QhHR9By8TiIkL`VWyQiMAnNMs!ge}p zv)NXf&E_QXONPZ_Nh~NRuv1Epg!_HjW;134kB`3kNTJ`hgYmvQDiooN08wd7K=rfpPyeWNz&o4GT|{(UtbSV z6d_5{;isQ|y4Ykg>Bw*ntJSJ2EG#S(1mQEr7~0y}ED#nLr$kNN2}G29IE>bnZ&)l zy}sVw-g<+ihf`>}orAHnJ^n00000NkvXX Hu0mjf@pdc% literal 0 HcmV?d00001 diff --git a/src/components/TrainsView/TrainSchedule.vue b/src/components/TrainsView/TrainSchedule.vue index ecb4a77..961f5c6 100644 --- a/src/components/TrainsView/TrainSchedule.vue +++ b/src/components/TrainsView/TrainSchedule.vue @@ -56,7 +56,19 @@ -
{{ stop.departureLine }}
+
+ {{ stop.departureLine }} | {{ stop.departureLineSpeed }} + + + + +
+
+ + {{ scheduleStops[i + 1].arrivalLine }} | + {{ scheduleStops[i + 1].arrivalLineSpeed }} + + + + +
@@ -117,6 +142,12 @@ export interface TrainScheduleStop { arrivalLine: string | null; departureLine: string | null; + arrivalLineSpeed: number; + arrivalLineElectrified: boolean | null; + + departureLineSpeed: number; + departureLineElectrified: boolean | null; + comments: string | null; } @@ -154,6 +185,17 @@ export default defineComponent({ ) currentSceneryIndex++; + const sceneryName = this.train.timetableData!.sceneryNames[currentSceneryIndex]; + const sceneryInfo = this.apiStore.sceneryData.find((st) => st.name == sceneryName); + + const arrivalLineInfo = sceneryInfo?.routesInfo.find( + (r) => r.routeName == stop.arrivalLine + ); + + const departureLineInfo = sceneryInfo?.routesInfo.find( + (r) => r.routeName == stop.departureLine + ); + return { nameHtml: stop.stopName, nameRaw: stop.stopNameRAW, @@ -172,7 +214,12 @@ export default defineComponent({ comments: stop.comments ?? null, arrivalLine: stop.arrivalLine, + arrivalLineSpeed: arrivalLineInfo?.routeSpeed ?? 0, + arrivalLineElectrified: arrivalLineInfo?.isElectric ?? null, + departureLine: stop.departureLine, + departureLineSpeed: departureLineInfo?.routeSpeed ?? 0, + departureLineElectrified: departureLineInfo?.isElectric ?? null, type: stop.stopType, distance: stop.stopDistance, @@ -181,7 +228,7 @@ export default defineComponent({ isSBL: /sbl/gi.test(stop.stopName), position: stop.beginsHere ? 'begin' : stop.terminatesHere ? 'end' : 'en-route', sceneryHash: '', - sceneryName: this.train.timetableData!.sceneryNames[currentSceneryIndex], + sceneryName, status: stop.confirmed ? 'confirmed' : stop.stopped ? 'stopped' : 'unconfirmed' }; }) ?? [] @@ -483,22 +530,26 @@ $blinkAnim: 0.5s ease-in-out alternate infinite blink; } } -.bottom-line-info { - .scenery-change-name { - position: relative; - margin: 0.25em 0; +.scenery-route { + display: flex; + align-items: center; + gap: 5px; +} - &::before { - content: ''; - position: absolute; - height: 2px; - width: 30px; - background-color: #aaa; +.scenery-change-name { + position: relative; + margin: 0.25em 0; - top: 50%; - right: calc(100% + 5px); - transform: translate(0, -50%); - } + &::before { + content: ''; + position: absolute; + height: 2px; + width: 30px; + background-color: #aaa; + + top: 50%; + right: calc(100% + 5px); + transform: translate(0, -50%); } } From 6c1e00d002fd16ce40d653b92ec6b97ca4b34387 Mon Sep 17 00:00:00 2001 From: Spythere Date: Tue, 4 Jun 2024 15:57:17 +0200 Subject: [PATCH 38/78] 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; From 45af6495053da748eefe3a87fc9f586a482969aa Mon Sep 17 00:00:00 2001 From: Spythere Date: Wed, 5 Jun 2024 16:01:17 +0200 Subject: [PATCH 39/78] chore: changes in scenery view layout --- .../SceneryView/SceneryDispatchersHistory.vue | 144 ++++++++++-------- .../SceneryView/SceneryTimetablesHistory.vue | 136 +++++++++-------- src/styles/global.scss | 38 ++--- src/styles/sceneryViewTables.scss | 8 +- src/views/SceneryView.vue | 4 +- 5 files changed, 178 insertions(+), 152 deletions(-) diff --git a/src/components/SceneryView/SceneryDispatchersHistory.vue b/src/components/SceneryView/SceneryDispatchersHistory.vue index 09531be..24fbb6a 100644 --- a/src/components/SceneryView/SceneryDispatchersHistory.vue +++ b/src/components/SceneryView/SceneryDispatchersHistory.vue @@ -1,71 +1,73 @@ @@ -149,6 +151,20 @@ export default defineComponent({ @import '../../styles/responsive.scss'; @import '../../styles/sceneryViewTables.scss'; +.scenery-dispatchers-history { + height: 100%; + overflow: auto; + + display: grid; + gap: 0.5em; + grid-template-rows: auto 40px; +} + +.history-wrapper { + position: relative; + overflow: auto; +} + .level-badge { margin: 0 auto; } diff --git a/src/components/SceneryView/SceneryTimetablesHistory.vue b/src/components/SceneryView/SceneryTimetablesHistory.vue index 29267d6..d036175 100644 --- a/src/components/SceneryView/SceneryTimetablesHistory.vue +++ b/src/components/SceneryView/SceneryTimetablesHistory.vue @@ -1,69 +1,70 @@ @@ -142,13 +143,24 @@ export default defineComponent({ @import '../../styles/responsive.scss'; @import '../../styles/sceneryViewTables.scss'; +.scenery-timetables-history { + height: 100%; + overflow: auto; + + display: grid; + gap: 1em; + grid-template-rows: 40px auto 40px; +} + +.history-wrapper { + position: relative; + overflow: auto; +} + .top-filters { display: flex; justify-content: center; gap: 0.5em; - - button { - padding: 0.5em; - } + padding: 0.25em; } diff --git a/src/styles/global.scss b/src/styles/global.scss index 9342ec8..47fe70e 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -228,6 +228,10 @@ a.a-button { background-color: #3c3c3c; } + + &:hover { + background-color: #555; + } } &.btn--image { @@ -283,22 +287,11 @@ a.a-button { } } -@include smallScreen { - ::-webkit-scrollbar { - width: 0.5em; - height: 0.5em; - - &-track { - background-color: #222; - } - - &-thumb { - background-color: #777; - } - } +// Basic tooltip +[data-tooltip] { + cursor: help; } -// Basic tooltip [data-tooltip]:hover::after, [data-tooltip]:focus::after { position: absolute; @@ -315,11 +308,20 @@ a.a-button { z-index: 100; } -[data-tooltip] { - cursor: help; -} - @include smallScreen { + ::-webkit-scrollbar { + width: 0.5em; + height: 0.5em; + + &-track { + background-color: #222; + } + + &-thumb { + background-color: #777; + } + } + [data-tooltip]:hover::after, [data-tooltip]:focus::after { transform: translate(-50%, 2em); diff --git a/src/styles/sceneryViewTables.scss b/src/styles/sceneryViewTables.scss index 2e3f435..1306edb 100644 --- a/src/styles/sceneryViewTables.scss +++ b/src/styles/sceneryViewTables.scss @@ -1,9 +1,3 @@ -.scenery-table-section { - position: relative; - height: 100%; - overflow-y: scroll; -} - table.scenery-history-table { width: 100%; border-collapse: collapse; @@ -25,7 +19,7 @@ table.scenery-history-table { td { padding: 0.75em; - border-bottom: solid 5px #111; + border-bottom: solid 5px #181818; } } diff --git a/src/views/SceneryView.vue b/src/views/SceneryView.vue index e75adf2..76ed7a6 100644 --- a/src/views/SceneryView.vue +++ b/src/views/SceneryView.vue @@ -229,6 +229,7 @@ button.back-btn { padding: 1em 0.5em; height: calc(100vh - 0.5em); + min-height: 800px; overflow: auto; display: flex; @@ -240,9 +241,10 @@ button.back-btn { padding: 1em 0.5em; height: calc(100vh - 0.5em); + min-height: 800px; display: grid; - grid-template-rows: auto 1fr auto; + grid-template-rows: auto 1fr; gap: 1em; } From c84fbbcf420b8a9aec082cbb5dc2766924c6dac9 Mon Sep 17 00:00:00 2001 From: Spythere Date: Wed, 5 Jun 2024 20:03:05 +0200 Subject: [PATCH 40/78] chore: added scenery timetables history modes --- src/components/JournalView/typings.ts | 4 +- .../SceneryView/SceneryDispatchersHistory.vue | 2 +- src/components/SceneryView/SceneryInfo.vue | 5 -- .../SceneryView/SceneryTimetablesHistory.vue | 71 ++++++++++++++----- src/locales/en.json | 8 ++- src/locales/pl.json | 6 ++ src/styles/JournalSection.scss | 2 +- src/styles/sceneryViewTables.scss | 1 + src/views/JournalTimetables.vue | 26 +++++-- src/views/SceneryView.vue | 27 +++---- 10 files changed, 105 insertions(+), 47 deletions(-) diff --git a/src/components/JournalView/typings.ts b/src/components/JournalView/typings.ts index ae7c02b..447c427 100644 --- a/src/components/JournalView/typings.ts +++ b/src/components/JournalView/typings.ts @@ -6,7 +6,9 @@ export namespace Journal { | 'search-train' | 'search-date' | 'search-dispatcher' - | 'search-issuedFrom'; + | 'search-issuedFrom' + | 'search-terminatingAt' + | 'search-via'; export type TimetableSearchType = { [key in TimetableSearchKey]: string; diff --git a/src/components/SceneryView/SceneryDispatchersHistory.vue b/src/components/SceneryView/SceneryDispatchersHistory.vue index 24fbb6a..3e63a9c 100644 --- a/src/components/SceneryView/SceneryDispatchersHistory.vue +++ b/src/components/SceneryView/SceneryDispatchersHistory.vue @@ -37,7 +37,7 @@ {{ historyItem.dispatcherLevel >= 2 ? historyItem.dispatcherLevel : 'L' }} - ? + - {{ historyItem.dispatcherRate }} diff --git a/src/components/SceneryView/SceneryInfo.vue b/src/components/SceneryView/SceneryInfo.vue index 120daf5..1bec2a2 100644 --- a/src/components/SceneryView/SceneryInfo.vue +++ b/src/components/SceneryView/SceneryInfo.vue @@ -124,11 +124,6 @@ h3.section-header { align-items: center; font-size: 1.2em; - - img { - width: 1.1em; - margin-left: 0.5em; - } } .info-lists { diff --git a/src/components/SceneryView/SceneryTimetablesHistory.vue b/src/components/SceneryView/SceneryTimetablesHistory.vue index d036175..ba04962 100644 --- a/src/components/SceneryView/SceneryTimetablesHistory.vue +++ b/src/components/SceneryView/SceneryTimetablesHistory.vue @@ -1,11 +1,19 @@