mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 22:08:12 +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-type="BaseTooltip"
|
||||||
:data-tooltip-content="$t('app.tooltip-driver-offline')"
|
:data-tooltip-content="$t('app.tooltip-driver-offline')"
|
||||||
></i>
|
></i>
|
||||||
|
|
||||||
<i
|
<i
|
||||||
v-if="train.currentStationName.indexOf('.sc') != -1"
|
v-if="train.currentStationName.indexOf('.sc') != -1"
|
||||||
class="fa-solid fa-user-slash"
|
class="fa-solid fa-ban"
|
||||||
style="color: salmon"
|
style="color: lightcoral"
|
||||||
data-tooltip-type="BaseTooltip"
|
data-tooltip-type="BaseTooltip"
|
||||||
:data-tooltip-content="$t('app.tooltip-scenery-offline')"
|
:data-tooltip-content="$t('app.tooltip-scenery-offline')"
|
||||||
></i>
|
></i>
|
||||||
|
|||||||
@@ -4,7 +4,16 @@
|
|||||||
:data-minor="stop.isSBL || (stop.nameRaw.endsWith(', po') && !stop.duration)"
|
:data-minor="stop.isSBL || (stop.nameRaw.endsWith(', po') && !stop.duration)"
|
||||||
>
|
>
|
||||||
<router-link v-if="/(, podg$|<strong>)/.test(stop.nameHtml)" :to="sceneryHref">
|
<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>
|
</router-link>
|
||||||
|
|
||||||
<span v-else class="stop-name">{{ stop.nameRaw }}</span>
|
<span v-else class="stop-name">{{ stop.nameRaw }}</span>
|
||||||
@@ -118,10 +127,6 @@ s {
|
|||||||
&.misc {
|
&.misc {
|
||||||
background: gray;
|
background: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
i {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.date {
|
.date {
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
|
|
||||||
<div class="status-badges">
|
<div class="status-badges">
|
||||||
<div v-if="!train.currentStationHash" class="train-badge offline">
|
<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') }}
|
{{ $t('trains.scenery-offline') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ import StopLabel from './StopLabel.vue';
|
|||||||
import StockList from '../Global/StockList.vue';
|
import StockList from '../Global/StockList.vue';
|
||||||
import { useMainStore } from '../../store/mainStore';
|
import { useMainStore } from '../../store/mainStore';
|
||||||
import { useApiStore } from '../../store/apiStore';
|
import { useApiStore } from '../../store/apiStore';
|
||||||
import { StationRoutesInfo, Train } from '../../typings/common';
|
import { Train } from '../../typings/common';
|
||||||
import { TrainScheduleStop } from './typings';
|
import { TrainScheduleStop } from './typings';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -173,6 +173,10 @@ export default defineComponent({
|
|||||||
const sceneryName = timetablePath[currentPathIndex].stationName;
|
const sceneryName = timetablePath[currentPathIndex].stationName;
|
||||||
const sceneryInfo = this.apiStore.sceneryData.find((st) => st.name == sceneryName);
|
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(
|
const arrivalLineInfo = sceneryInfo?.routesInfo.find(
|
||||||
(r) => r.routeName == stop.arrivalLine
|
(r) => r.routeName == stop.arrivalLine
|
||||||
);
|
);
|
||||||
@@ -214,8 +218,10 @@ export default defineComponent({
|
|||||||
isLastConfirmed: this.lastConfirmed === i && !stop.terminatesHere,
|
isLastConfirmed: this.lastConfirmed === i && !stop.terminatesHere,
|
||||||
isSBL: /sbl/gi.test(stop.stopName),
|
isSBL: /sbl/gi.test(stop.stopName),
|
||||||
position: stop.beginsHere ? 'begin' : stop.terminatesHere ? 'end' : 'en-route',
|
position: stop.beginsHere ? 'begin' : stop.terminatesHere ? 'end' : 'en-route',
|
||||||
|
status: stop.confirmed ? 'confirmed' : stop.stopped ? 'stopped' : 'unconfirmed',
|
||||||
|
|
||||||
sceneryName,
|
sceneryName,
|
||||||
status: stop.confirmed ? 'confirmed' : stop.stopped ? 'stopped' : 'unconfirmed'
|
isSceneryOnline
|
||||||
};
|
};
|
||||||
}) ?? []
|
}) ?? []
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -151,6 +151,8 @@ export interface TrainScheduleStop {
|
|||||||
isSBL: boolean;
|
isSBL: boolean;
|
||||||
|
|
||||||
sceneryName: string | null;
|
sceneryName: string | null;
|
||||||
|
isSceneryOnline: boolean;
|
||||||
|
|
||||||
distance: number;
|
distance: number;
|
||||||
|
|
||||||
arrivalLine: string | null;
|
arrivalLine: string | null;
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@
|
|||||||
"migration-confirm": "Roger that!",
|
"migration-confirm": "Roger that!",
|
||||||
"offline": "App is in the offline mode!",
|
"offline": "App is in the offline mode!",
|
||||||
"tooltip-driver-offline": "Driver is offline",
|
"tooltip-driver-offline": "Driver is offline",
|
||||||
"tooltip-scenery-offline": "Offline ride through the scenery"
|
"tooltip-scenery-offline": "Scenery is offline"
|
||||||
},
|
},
|
||||||
"footer": {
|
"footer": {
|
||||||
"discord": "Stacjownik Discord server"
|
"discord": "Stacjownik Discord server"
|
||||||
|
|||||||
+1
-1
@@ -47,7 +47,7 @@
|
|||||||
"no-result": "Brak wyników o podanych kryteriach!",
|
"no-result": "Brak wyników o podanych kryteriach!",
|
||||||
"offline": "Aplikacja w trybie offline!",
|
"offline": "Aplikacja w trybie offline!",
|
||||||
"tooltip-driver-offline": "Maszynista offline",
|
"tooltip-driver-offline": "Maszynista offline",
|
||||||
"tooltip-scenery-offline": "Jazda offline przez scenerię"
|
"tooltip-scenery-offline": "Sceneria offline"
|
||||||
},
|
},
|
||||||
"footer": {
|
"footer": {
|
||||||
"discord": "Serwer Discord Stacjownika"
|
"discord": "Serwer Discord Stacjownika"
|
||||||
|
|||||||
Reference in New Issue
Block a user