mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Poprawki w karcie pociągu
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="dispatcher" v-if="station.onlineInfo">
|
||||
<span
|
||||
class="dispatcher_level"
|
||||
:style="calculateExpStyle(station.onlineInfo.dispatcherExp, station.onlineInfo.dispatcherIsSupporter)"
|
||||
:style="calculateExpStyle(station.onlineInfo.dispatcherExp)"
|
||||
>
|
||||
{{ station.onlineInfo.dispatcherExp > 1 ? station.onlineInfo.dispatcherExp : 'L' }}
|
||||
</span>
|
||||
|
||||
@@ -24,37 +24,39 @@
|
||||
</span>
|
||||
|
||||
<span class="timetable_driver-stats">
|
||||
<div>
|
||||
<span>
|
||||
<b>{{ train.timetableData.category }}</b>
|
||||
<b>{{ ' ' + train.trainNo }}</b> |
|
||||
|
||||
<span>{{ train.driverName }}</span>
|
||||
</div>
|
||||
</span>
|
||||
|
||||
<span class="hide-info" @click="toggleInfo">
|
||||
<img :src="icons.ascArrow" :class="{ hidden: !isInfoShown }" />
|
||||
<span>{{ isInfoShown ? 'Ukryj' : 'Pokaż' }} informacje</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="timetable_route">
|
||||
{{ train.timetableData.route.replace('|', ' - ') }}
|
||||
|
||||
<img
|
||||
v-if="getSceneriesWithComments(train.timetableData).length > 0"
|
||||
class="image-warning"
|
||||
:src="icons.warning"
|
||||
:title="`${$t('trains.timetable-comments')} (${getSceneriesWithComments(train.timetableData).join(',')})`"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="timetable_stops">
|
||||
<div class="timetable_stops" v-if="isInfoShown">
|
||||
<span v-if="train.timetableData.followingStops.length > 2">
|
||||
{{ $t('trains.via-title') }}
|
||||
<span v-html="displayStopList(train.timetableData.followingStops)"></span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="timetable_comments" v-if="getSceneriesWithComments(train.timetableData).length > 0 && isInfoShown">
|
||||
{{ $t('trains.comment') }} <b>{{ getSceneriesWithComments(train.timetableData).join(',') }}</b>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="info-driver">
|
||||
<section class="info-driver" v-show="isInfoShown">
|
||||
<div class="driver_cars">
|
||||
<!-- <span v-else>{{ displayLocoInfo(train.locoType) }}</span> -->
|
||||
</div>
|
||||
@@ -130,14 +132,26 @@ export default defineComponent({
|
||||
data: () => ({
|
||||
icons: {
|
||||
warning: require('@/assets/icon-warning.svg'),
|
||||
ascArrow: require('@/assets/icon-arrow-asc.svg'),
|
||||
},
|
||||
|
||||
isInfoShown: true,
|
||||
}),
|
||||
|
||||
methods: {
|
||||
toggleInfo() {
|
||||
this.isInfoShown = !this.isInfoShown;
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.image-warning {
|
||||
width: 1em;
|
||||
width: 1.2em;
|
||||
vertical-align: text-bottom;
|
||||
|
||||
margin-left: 0.2em;
|
||||
}
|
||||
|
||||
.extended {
|
||||
@@ -145,6 +159,21 @@ export default defineComponent({
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.hide-info {
|
||||
margin-left: 1em;
|
||||
|
||||
img {
|
||||
width: 1.3em;
|
||||
vertical-align: text-bottom;
|
||||
|
||||
&.hidden {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.info-timetable {
|
||||
display: flex;
|
||||
}
|
||||
@@ -170,9 +199,6 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
&_route {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
margin: 5px 0;
|
||||
@@ -185,6 +211,10 @@ export default defineComponent({
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
&_comments {
|
||||
color: salmon;
|
||||
}
|
||||
|
||||
&_warnings {
|
||||
display: flex;
|
||||
color: black;
|
||||
|
||||
@@ -14,14 +14,7 @@
|
||||
{{ Math.floor(stop.stopDistance) }}
|
||||
</span>
|
||||
|
||||
<span class="stop-name">
|
||||
<span v-html="stop.stopName"></span>
|
||||
|
||||
<span class="g-tooltip" v-if="stop.comments">
|
||||
<img :src="icons.warning" />
|
||||
<span class="content" v-html="stop.comments"> </span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="stop-name" v-html="stop.stopName"> </span>
|
||||
|
||||
<stop-date :stop="stop" />
|
||||
</span>
|
||||
@@ -29,6 +22,10 @@
|
||||
<div class="stop_line" v-if="i < followingStops.length - 1">
|
||||
<div class="progress-bar"></div>
|
||||
|
||||
<div v-if="stop.comments" style="color: salmon;">
|
||||
<b>{{ stop.stopNameRAW }}</b>: <span v-html="stop.comments"></span>
|
||||
</div>
|
||||
|
||||
<span v-if="stop.departureLine == followingStops[i + 1].arrivalLine">
|
||||
{{ stop.departureLine }}
|
||||
</span>
|
||||
@@ -117,6 +114,8 @@ export default defineComponent({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '../../styles/responsive.scss';
|
||||
|
||||
$barClr: #b1b1b1;
|
||||
$confirmedClr: #18d818;
|
||||
$stoppedClr: #f55f31;
|
||||
@@ -133,14 +132,16 @@ $stopNameClr: #22a8d1;
|
||||
}
|
||||
|
||||
.train-schedule {
|
||||
padding-top: 1em;
|
||||
margin-top: 1em;
|
||||
|
||||
min-height: 400px;
|
||||
|
||||
overflow-y: auto;
|
||||
|
||||
z-index: 5;
|
||||
|
||||
@include smallScreen() {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
}
|
||||
|
||||
.schedule-wrapper {
|
||||
@@ -166,13 +167,31 @@ $stopNameClr: #22a8d1;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.g-tooltip {
|
||||
margin-left: 0.5em;
|
||||
.stop-comment {
|
||||
background: forestgreen;
|
||||
padding: 0.3em 0.5em;
|
||||
|
||||
img {
|
||||
width: 1em;
|
||||
}
|
||||
max-width: 250px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
|
||||
width: 2em;
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
text-overflow: ellipsis;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 1em;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,6 +295,8 @@ ul.stop_list > li.stop {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
|
||||
flex-wrap: wrap;
|
||||
|
||||
padding: 0.15em 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user