mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
chore: added scenery offline icon in active train schedule; icon improvements
This commit is contained in:
@@ -4,7 +4,16 @@
|
||||
:data-minor="stop.isSBL || (stop.nameRaw.endsWith(', po') && !stop.duration)"
|
||||
>
|
||||
<router-link v-if="/(, podg$|<strong>)/.test(stop.nameHtml)" :to="sceneryHref">
|
||||
<b class="stop-name">{{ stop.nameRaw }}</b>
|
||||
<b class="stop-name"
|
||||
><i
|
||||
v-if="!stop.isSceneryOnline"
|
||||
class="fa-solid fa-ban"
|
||||
data-tooltip-type="BaseTooltip"
|
||||
:data-tooltip-content="$t('app.tooltip-scenery-offline')"
|
||||
style="margin-right: 0.25rem; color: salmon"
|
||||
></i>
|
||||
{{ stop.nameRaw }}
|
||||
</b>
|
||||
</router-link>
|
||||
|
||||
<span v-else class="stop-name">{{ stop.nameRaw }}</span>
|
||||
@@ -118,10 +127,6 @@ s {
|
||||
&.misc {
|
||||
background: gray;
|
||||
}
|
||||
|
||||
i {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.date {
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
<div class="status-badges">
|
||||
<div v-if="!train.currentStationHash" class="train-badge offline">
|
||||
<i class="fa-solid fa-shop-slash"></i>
|
||||
<i class="fa-solid fa-ban"></i>
|
||||
{{ $t('trains.scenery-offline') }}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ import StopLabel from './StopLabel.vue';
|
||||
import StockList from '../Global/StockList.vue';
|
||||
import { useMainStore } from '../../store/mainStore';
|
||||
import { useApiStore } from '../../store/apiStore';
|
||||
import { StationRoutesInfo, Train } from '../../typings/common';
|
||||
import { Train } from '../../typings/common';
|
||||
import { TrainScheduleStop } from './typings';
|
||||
|
||||
export default defineComponent({
|
||||
@@ -173,6 +173,10 @@ export default defineComponent({
|
||||
const sceneryName = timetablePath[currentPathIndex].stationName;
|
||||
const sceneryInfo = this.apiStore.sceneryData.find((st) => st.name == sceneryName);
|
||||
|
||||
const isSceneryOnline =
|
||||
(this.apiStore.activeData?.activeSceneries?.find((sc) => sc.stationName == sceneryName)
|
||||
?.isOnline ?? 0) == 1;
|
||||
|
||||
const arrivalLineInfo = sceneryInfo?.routesInfo.find(
|
||||
(r) => r.routeName == stop.arrivalLine
|
||||
);
|
||||
@@ -214,8 +218,10 @@ export default defineComponent({
|
||||
isLastConfirmed: this.lastConfirmed === i && !stop.terminatesHere,
|
||||
isSBL: /sbl/gi.test(stop.stopName),
|
||||
position: stop.beginsHere ? 'begin' : stop.terminatesHere ? 'end' : 'en-route',
|
||||
status: stop.confirmed ? 'confirmed' : stop.stopped ? 'stopped' : 'unconfirmed',
|
||||
|
||||
sceneryName,
|
||||
status: stop.confirmed ? 'confirmed' : stop.stopped ? 'stopped' : 'unconfirmed'
|
||||
isSceneryOnline
|
||||
};
|
||||
}) ?? []
|
||||
);
|
||||
|
||||
@@ -151,6 +151,8 @@ export interface TrainScheduleStop {
|
||||
isSBL: boolean;
|
||||
|
||||
sceneryName: string | null;
|
||||
isSceneryOnline: boolean;
|
||||
|
||||
distance: number;
|
||||
|
||||
arrivalLine: string | null;
|
||||
|
||||
Reference in New Issue
Block a user