mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
chore: added scenery offline icon in active train schedule; icon improvements
This commit is contained in:
@@ -29,11 +29,11 @@
|
||||
data-tooltip-type="BaseTooltip"
|
||||
:data-tooltip-content="$t('app.tooltip-driver-offline')"
|
||||
></i>
|
||||
|
||||
|
||||
<i
|
||||
v-if="train.currentStationName.indexOf('.sc') != -1"
|
||||
class="fa-solid fa-user-slash"
|
||||
style="color: salmon"
|
||||
class="fa-solid fa-ban"
|
||||
style="color: lightcoral"
|
||||
data-tooltip-type="BaseTooltip"
|
||||
:data-tooltip-content="$t('app.tooltip-scenery-offline')"
|
||||
></i>
|
||||
|
||||
@@ -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;
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@
|
||||
"migration-confirm": "Roger that!",
|
||||
"offline": "App is in the offline mode!",
|
||||
"tooltip-driver-offline": "Driver is offline",
|
||||
"tooltip-scenery-offline": "Offline ride through the scenery"
|
||||
"tooltip-scenery-offline": "Scenery is offline"
|
||||
},
|
||||
"footer": {
|
||||
"discord": "Stacjownik Discord server"
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@
|
||||
"no-result": "Brak wyników o podanych kryteriach!",
|
||||
"offline": "Aplikacja w trybie offline!",
|
||||
"tooltip-driver-offline": "Maszynista offline",
|
||||
"tooltip-scenery-offline": "Jazda offline przez scenerię"
|
||||
"tooltip-scenery-offline": "Sceneria offline"
|
||||
},
|
||||
"footer": {
|
||||
"discord": "Serwer Discord Stacjownika"
|
||||
|
||||
Reference in New Issue
Block a user