Poprawki w stylach; dodano ikonę pociągu offline

This commit is contained in:
2022-04-14 14:02:49 +02:00
parent 274dfadc11
commit ebede5349c
11 changed files with 287 additions and 87 deletions
+13 -2
View File
@@ -12,6 +12,10 @@
<strong v-if="train.timetableData">{{ train.timetableData.category }}&nbsp;</strong>
<strong>{{ train.trainNo }}</strong>
<span>&nbsp;| {{ train.driverName }}</span>
<img class="image-offline" v-if="!train.currentStationHash" :src="icons.offline" alt="offline"
:title="$t('trains.offline')"
>
</div>
<div class="timetable_route">
@@ -43,10 +47,14 @@
</div>
<div class="driver_position text--grayed">
<span v-if="train.currentStationName">
<span v-if="train.currentStationHash">
{{ $t('trains.current-scenery') }} <span>{{ train['currentStationName'] }}&nbsp;</span>
</span>
<span v-else>
{{ $t('trains.current-scenery') }} <span>{{ train['currentStationName'].replace(/.[a-zA-Z0-9]+.sc/, "") }} (offline)&nbsp;</span>
</span>
<span v-if="train.signal">
{{ $t('trains.current-signal') }} <span>{{ train['signal'] }}&nbsp;</span>
</span>
@@ -99,6 +107,7 @@ export default defineComponent({
data: () => ({
icons: {
warning: require('@/assets/icon-warning.svg'),
offline: require("@/assets/icon-offline.svg")
},
}),
});
@@ -107,7 +116,7 @@ export default defineComponent({
<style lang="scss" scoped>
@import '../../styles/responsive.scss';
.image-warning {
.image-warning, .image-offline {
width: 1em;
height: 1em;
@@ -124,6 +133,8 @@ export default defineComponent({
}
}
.simple {
display: grid;
grid-template-columns: 2fr 1fr;