From ee1c1620095a52ee3c62065f2516209097b94454 Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 16 Jan 2022 18:34:16 +0100 Subject: [PATCH] =?UTF-8?q?Dodano=20uwagi=20eksploatacyjne=20na=20li=C5=9B?= =?UTF-8?q?cie=20rozk=C5=82ad=C3=B3w=20scenerii;=20poprawki=20tooltip?= =?UTF-8?q?=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SceneryView/SceneryTimetable.vue | 114 +++++------------- src/components/TrainsView/TrainSchedule.vue | 17 +-- src/data/decodedChars.json | 20 --- src/styles/global.scss | 7 +- 4 files changed, 43 insertions(+), 115 deletions(-) delete mode 100644 src/data/decodedChars.json diff --git a/src/components/SceneryView/SceneryTimetable.vue b/src/components/SceneryView/SceneryTimetable.vue index 6aee13a..37f4a18 100644 --- a/src/components/SceneryView/SceneryTimetable.vue +++ b/src/components/SceneryView/SceneryTimetable.vue @@ -40,22 +40,30 @@ > - + {{ scheduledTrain.category }} {{ scheduledTrain.trainNo }} + + + + + | {{ scheduledTrain.driverName }} +
{{ scheduledTrain.beginsAt }} - {{ scheduledTrain.terminatesAt }}
+ {{ $t(`timetables.${scheduledTrain.stopStatus}`) }}
+ + {{ scheduledTrain.stopInfo.arrivalTimeString }} ({{ scheduledTrain.stopInfo.arrivalDelay }}) + {{ scheduledTrain.stopInfo.stopTime }} @@ -75,6 +85,7 @@ + + {{ scheduledTrain.stopInfo.departureTimeString }} ({{ scheduledTrain.stopInfo.departureDelay }}) @@ -118,6 +130,9 @@ export default defineComponent({ data: () => ({ viewIcon: require('@/assets/icon-view.svg'), listOpen: false, + icons: { + warning: require('@/assets/icon-warning.svg'), + }, }), setup(props) { @@ -128,7 +143,11 @@ export default defineComponent({ const timetableDataStatus = computed(() => store.getters[GETTERS.timetableDataStatus]) as ComputedRef; - const selectedCheckpoint = ref(''); + const selectedCheckpoint = ref( + props.station?.generalInfo?.checkpoints?.length == 0 + ? '' + : props.station?.generalInfo?.checkpoints[0].checkpointName || '' + ); const computedScheduledTrains = computed(() => { if (!props.station) return []; @@ -236,82 +255,6 @@ h3 { } } -.select-box { - font-size: 1.2em; -} - -.option { - &-container { - position: relative; - - input { - display: none; - } - - label { - padding: 0.5em 0.35em; - cursor: pointer; - } - } - - &-item { - display: flex; - justify-content: center; - - &:hover { - background-color: rgba(#868686, 0.85); - } - - transition: background 150ms ease-in; - } - - &-selected, - &-list { - background: #444; - border-radius: 0.5em; - } - - &-selected { - display: flex; - justify-content: space-between; - align-items: center; - - padding: 0.35em 0.7em; - min-width: 10em; - cursor: pointer; - - span { - margin-right: 2em; - } - - img { - max-width: 0.75em; - } - } - - &-list { - position: absolute; - top: 100%; - left: 0; - - width: 100%; - - z-index: 10; - - background-color: rgba(#222, 0.95); - overflow: hidden; - - max-height: 0; - - &.open { - max-height: 250px; - opacity: 1; - } - - transition: all 150ms ease-in; - } -} - .timetable { &-header { a { @@ -335,6 +278,7 @@ h3 { background: $bgLigtherCol; cursor: pointer; + z-index: 10; @include smallScreen() { display: flex; @@ -363,8 +307,6 @@ h3 { text-align: left; - overflow: hidden; - @include smallScreen() { width: 95%; font-size: 1.3em; @@ -433,13 +375,23 @@ h3 { } .general-info { - span { + .info-number { color: $accentCol; + } .info-route { margin-top: 0.5em; } + + .g-tooltip > .content { + z-index: 100; + color: white; + } + + img { + width: 1.1em; + } } .general-status { diff --git a/src/components/TrainsView/TrainSchedule.vue b/src/components/TrainsView/TrainSchedule.vue index 9dcd660..2514856 100644 --- a/src/components/TrainsView/TrainSchedule.vue +++ b/src/components/TrainsView/TrainSchedule.vue @@ -87,7 +87,6 @@ @@ -214,13 +208,12 @@ $stopNameClr: #22a8d1; display: flex; align-items: center; - .g-tooltip > .content { - font-size: 0.9em; - } - - img { - width: 1em; + .g-tooltip { margin-left: 0.5em; + + img { + width: 1em; + } } } diff --git a/src/data/decodedChars.json b/src/data/decodedChars.json deleted file mode 100644 index 1168cdd..0000000 --- a/src/data/decodedChars.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "Ó": "Ó", - "ó": "ó", - "Ą": "Ą", - "ą": "ą", - "Ć": "Ć", - "ć": "ć", - "ʀ": "Ę", - "ʁ": "ę", - "Ł": "Ł", - "ł": "ł", - "Ń": "Ń", - "ń": "ń", - "Ś": "Ś", - "ś": "ś", - "Ź": "Ź", - "ź": "ź", - "Ż": "Ż", - "ż": "ż" -} \ No newline at end of file diff --git a/src/styles/global.scss b/src/styles/global.scss index 4ea0513..f9729d8 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -50,13 +50,16 @@ body { .g-tooltip { position: relative; - z-index: 11; + display: inline-block; + vertical-align: middle; .content { position: absolute; left: 50%; top: 0; + z-index: 100; + transform: translate(-50%, -120%); visibility: hidden; @@ -67,10 +70,10 @@ body { background-color: gray; text-align: center; - padding: 0.15em; border-radius: .5em; transition: opacity 0.3s; + padding: 0.25em; &::after { content: "";