Compare commits

...

12 Commits

Author SHA1 Message Date
Spythere 916f6070ac Merge pull request #103 from Spythere/development
chore: added back merge gh workflow
2024-08-10 14:18:45 +02:00
Spythere a74ab6eb2a chore: added back merge gh workflow 2024-08-10 14:18:00 +02:00
Spythere 985c699ced Merge pull request #102 from Spythere/development
v1.26.1
2024-08-10 14:16:06 +02:00
Spythere 7e0e9146a5 fix: vehicle thumbnail cargo info 2024-08-10 14:08:32 +02:00
Spythere 30a0f05922 feat: journal dispatchers filtering by sc. hash 2024-08-10 14:00:25 +02:00
Spythere a30e04ca96 bump: v1.26.1 2024-08-09 15:24:48 +02:00
Spythere 1852d3e234 feat: category codes explanation tooltips 2024-08-09 15:24:26 +02:00
Spythere a17bf6c03f Merge branch 'development' 2024-08-09 14:12:07 +02:00
Spythere 766b08bc15 Merge branch 'master' of github.com:Spythere/stacjownik 2024-08-09 14:11:34 +02:00
Spythere cd1a4fa734 hotfix: checkpoint trains filtering 2024-08-06 14:18:26 +02:00
Spythere acbe761068 Merge branch 'development' 2024-08-05 16:02:20 +02:00
Spythere 44f6cf4232 Merge branch 'development' 2024-05-12 15:22:28 +02:00
14 changed files with 166 additions and 27 deletions
@@ -0,0 +1,17 @@
name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn && yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_STACJOWNIK_TD2 }}'
channelId: live
projectId: stacjownik-td2
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "stacjownik", "name": "stacjownik",
"version": "1.26.0", "version": "1.26.1",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
+6 -3
View File
@@ -2,7 +2,9 @@
<div class="stock-list"> <div class="stock-list">
<ul> <ul>
<li <li
v-for="({ vehicleName, vehicleCargo, images, imagesFallbacks }, i) in thumbnailNames" v-for="(
{ vehicleName, vehicleCargo, images, imagesFallbacks, vehicleString }, i
) in thumbnailNames"
:key="i" :key="i"
> >
<div class="stock-text"> <div class="stock-text">
@@ -13,7 +15,7 @@
<span> <span>
<VehicleThumbnail <VehicleThumbnail
v-for="(thumbnailImage, imageIndex) in images" v-for="(thumbnailImage, imageIndex) in images"
:vehicle-name="vehicleName" :vehicle-name="vehicleString"
:img-name="thumbnailImage" :img-name="thumbnailImage"
:fallback-name="imagesFallbacks[imageIndex]" :fallback-name="imagesFallbacks[imageIndex]"
/> />
@@ -63,7 +65,8 @@ export default defineComponent({
images: [] as string[], images: [] as string[],
imagesFallbacks: [] as string[], imagesFallbacks: [] as string[],
vehicleName, vehicleName,
vehicleCargo vehicleCargo,
vehicleString
}; };
// Generowanie członów EN57 // Generowanie członów EN57
+1 -2
View File
@@ -5,10 +5,9 @@
:src="`https://static.spythere.eu/thumbnails/v2/${imgName}.png`" :src="`https://static.spythere.eu/thumbnails/v2/${imgName}.png`"
height="60" height="60"
loading="lazy" loading="lazy"
:data-mouseover="vehicleName" data-tooltip-type="VehiclePreviewTooltip"
:data-tooltip-content="vehicleName" :data-tooltip-content="vehicleName"
:data-load-status="imgStatus" :data-load-status="imgStatus"
data-tooltip-type="VehiclePreviewTooltip"
@error="onImageError" @error="onImageError"
@load="onImageLoad" @load="onImageLoad"
/> />
@@ -9,7 +9,11 @@
</span> </span>
<span> <span>
<strong class="text--primary"> <strong
data-tooltip-type="BaseTooltip"
:data-tooltip-content="getCategoryExplanation(timetable.trainCategoryCode)"
class="text--primary tooltip-help"
>
{{ timetable.trainCategoryCode }} {{ timetable.trainCategoryCode }}
</strong> </strong>
<strong>&nbsp;{{ timetable.trainNo }}</strong> <strong>&nbsp;{{ timetable.trainNo }}</strong>
@@ -83,9 +87,10 @@ import dateMixin from '../../../mixins/dateMixin';
import modalTrainMixin from '../../../mixins/modalTrainMixin'; import modalTrainMixin from '../../../mixins/modalTrainMixin';
import styleMixin from '../../../mixins/styleMixin'; import styleMixin from '../../../mixins/styleMixin';
import { useApiStore } from '../../../store/apiStore'; import { useApiStore } from '../../../store/apiStore';
import trainCategoryMixin from '../../../mixins/trainCategoryMixin';
export default defineComponent({ export default defineComponent({
mixins: [dateMixin, modalTrainMixin, styleMixin], mixins: [dateMixin, modalTrainMixin, styleMixin, trainCategoryMixin],
data() { data() {
return { return {
@@ -73,15 +73,20 @@
> >
<span class="timetable-general"> <span class="timetable-general">
<span class="general-info"> <span class="general-info">
<span class="info-number"> <span>
<strong>{{ row.train.timetableData!.category }}</strong> <b
{{ row.train.trainNo }} data-tooltip-type="BaseTooltip"
:data-tooltip-content="getCategoryExplanation(row.train.timetableData!.category)"
class="text--primary tooltip-help"
>
{{ row.train.timetableData!.category }}
</b>
<b>&nbsp;{{ row.train.trainNo }}</b>
<span v-if="row.checkpointStop.comments" :title="row.checkpointStop.comments"> <span v-if="row.checkpointStop.comments" :title="row.checkpointStop.comments">
<img src="/images/icon-warning.svg" /> <img src="/images/icon-warning.svg" />
</span> </span>
</span> </span>
&nbsp;|&nbsp; &nbsp;&bull;&nbsp;
<span> <span>
{{ row.train.driverName }} {{ row.train.driverName }}
</span> </span>
@@ -180,13 +185,14 @@ import { useApiStore } from '../../store/apiStore';
import { ActiveScenery, Station } from '../../typings/common'; import { ActiveScenery, Station } from '../../typings/common';
import { SceneryTimetableRow } from './typings'; import { SceneryTimetableRow } from './typings';
import { getTrainStopStatus, stopStatusPriority } from './utils'; import { getTrainStopStatus, stopStatusPriority } from './utils';
import trainCategoryMixin from '../../mixins/trainCategoryMixin';
export default defineComponent({ export default defineComponent({
name: 'SceneryTimetable', name: 'SceneryTimetable',
components: { Loading, ScheduledTrainStatus }, components: { Loading, ScheduledTrainStatus },
mixins: [dateMixin, routerMixin, modalTrainMixin], mixins: [dateMixin, routerMixin, modalTrainMixin, trainCategoryMixin],
props: { props: {
station: { station: {
@@ -243,7 +249,7 @@ export default defineComponent({
return this.onlineScenery.scheduledTrains return this.onlineScenery.scheduledTrains
.filter( .filter(
(ct) => (ct) =>
ct.timetablePathElement.stationName == sceneryName && // ct.timetablePathElement.stationName == sceneryName &&
ct.train.region == this.mainStore.region.id && ct.train.region == this.mainStore.region.id &&
this.chosenCheckpoint && this.chosenCheckpoint &&
ct.checkpointStop.stopNameRAW.toLowerCase() == this.chosenCheckpoint.toLowerCase() ct.checkpointStop.stopNameRAW.toLowerCase() == this.chosenCheckpoint.toLowerCase()
+1
View File
@@ -23,6 +23,7 @@ export default defineComponent({
justify-content: center; justify-content: center;
align-items: center; align-items: center;
gap: 0.5em; gap: 0.5em;
white-space: pre-line;
padding: 0.25em 0.5em; padding: 0.25em 0.5em;
border-radius: 0.25em; border-radius: 0.25em;
+11 -7
View File
@@ -28,12 +28,15 @@
</span> </span>
</span> </span>
<strong> <b
<span v-if="train.timetableData" class="text--primary" v-if="train.timetableData"
>{{ train.timetableData.category }}&nbsp;</span data-tooltip-type="BaseTooltip"
> :data-tooltip-content="getCategoryExplanation(train.timetableData.category)"
<span class="train-number">{{ train.trainNo }}</span> class="text--primary tooltip-help"
</strong> >
{{ train.timetableData.category }}
</b>
<b class="train-number">{{ train.trainNo }}</b>
<span>&bull;</span> <span>&bull;</span>
<b <b
class="level-badge driver" class="level-badge driver"
@@ -181,9 +184,10 @@ import { useApiStore } from '../../store/apiStore';
import StockList from '../Global/StockList.vue'; import StockList from '../Global/StockList.vue';
import modalTrainMixin from '../../mixins/modalTrainMixin'; import modalTrainMixin from '../../mixins/modalTrainMixin';
import { Train } from '../../typings/common'; import { Train } from '../../typings/common';
import trainCategoryMixin from '../../mixins/trainCategoryMixin';
export default defineComponent({ export default defineComponent({
mixins: [trainInfoMixin, styleMixin, modalTrainMixin], mixins: [trainInfoMixin, styleMixin, modalTrainMixin, trainCategoryMixin],
components: { ProgressBar, StockList }, components: { ProgressBar, StockList },
props: { props: {
+41 -1
View File
@@ -48,7 +48,47 @@
"footer": { "footer": {
"discord": "Stacjownik Discord server" "discord": "Stacjownik Discord server"
}, },
"categories": {
"EI": "domestic express",
"EC": "international express",
"EN": "domestic night express",
"MP": "intervoivodeship bullet",
"MO": "intervoivodeship regio",
"MM": "international bullet",
"MH": "intervoivodeship night bullet",
"RP": "voivodeship bullet",
"RM": "international voivodeship regio",
"RO": "voivodeship regio",
"RA": "voivodeship regio (urban)",
"PW": "empty passenger",
"PX": "empty passenger test drive",
"TC": "international freight (intermodal)",
"TG": "international freight (organized cargo)",
"TR": "international freight (unorganized cargo)",
"TD": "domestic freight (intermodal)",
"TM": "domestic freight (organized cargo)",
"TN": "domestic freight (unorganized cargo)",
"TK": "freight (for stations & sidings)",
"TS": "empty freight test drive",
"TH": "locomotive rolling stock (over 3 vehicles)",
"LT": "freight locomotive only",
"LP": "passenger locomotive only",
"LS": "shunting locomotive only",
"LZ": "shunting locomotive only",
"ZN": "inspection / diagnostic type",
"ZU": "other maintenance type",
"E": "electric loco",
"J": "EMU",
"S": "diesel loco",
"M": "DMU"
},
"vehicle-preview": { "vehicle-preview": {
"loading": "Loading preview...", "loading": "Loading preview...",
"error": "Oops! The vehicle preview seems to be missing! :/" "error": "Oops! The vehicle preview seems to be missing! :/"
@@ -123,7 +163,7 @@
"search-train": "Train no.", "search-train": "Train no.",
"search-driver": "Driver name", "search-driver": "Driver name",
"search-dispatcher": "Dispatcher name", "search-dispatcher": "Dispatcher name",
"search-station": "Scenery name", "search-station": "Scenery name / #",
"search-author": "Timetable author name", "search-author": "Timetable author name",
"search-issuedFrom": "Issuing scenery name", "search-issuedFrom": "Issuing scenery name",
"search-via": "Via scenery name", "search-via": "Via scenery name",
+42 -1
View File
@@ -45,6 +45,47 @@
"footer": { "footer": {
"discord": "Serwer Discord Stacjownika" "discord": "Serwer Discord Stacjownika"
}, },
"categories": {
"EI": "ekspres krajowy",
"EC": "ekspres międzynarodowy",
"EN": "ekspres krajowy nocny",
"MP": "międzywojewódzki pospieszny",
"MO": "międzywojewódzki osobowy",
"MM": "międzynarodowy pospieszny",
"MH": "międzywojewódzki pospieszny (nocny)",
"RP": "wojewódzki pospieszny",
"RO": "wojewódzki osobowy",
"RM": "wojewódzki osobowy międzynarodowy",
"RA": "wojewódzki osobowy algomeracyjny",
"PW": "pasażerski próżny - służbowy",
"PX": "pasażerski próżny próbny",
"TC": "towarowy międzynarodowy intermodalny",
"TG": "towarowy międzynarodowy masowy",
"TR": "towarowy międzynarodowy niemasowy",
"TD": "towarowy krajowy intermodalny",
"TM": "towarowy krajowy masowy",
"TN": "towarowy krajowy niemasowy",
"TK": "towarowy zdawczy",
"TS": "towarowy próżny próbny",
"TH": "skład lokomotyw (powyżej 3 pojazdów)",
"LT": "lokomotywa towarowa luzem",
"LP": "lokomotywa pasażerska luzem",
"LS": "lokomotywa manewrowa luzem",
"LZ": "lokomotywa dla poc. utrzymaniowo-naprawczych",
"ZN": "inspekcyjny / diagnostyczny",
"ZU": "inny utrzymaniowy",
"E": "elektrowóz",
"J": "EZT",
"S": "spalinowóz",
"M": "SZT"
},
"vehicle-preview": { "vehicle-preview": {
"loading": "Ładowanie podglądu...", "loading": "Ładowanie podglądu...",
"error": "Ups! Nie znaleziono podglądu pojazdu! :/" "error": "Ups! Nie znaleziono podglądu pojazdu! :/"
@@ -119,7 +160,7 @@
"search-train": "Nr pociągu / #", "search-train": "Nr pociągu / #",
"search-driver": "Nick maszynisty", "search-driver": "Nick maszynisty",
"search-dispatcher": "Nick dyżurnego", "search-dispatcher": "Nick dyżurnego",
"search-station": "Nazwa scenerii", "search-station": "Nazwa scenerii / #",
"search-author": "Nick autora rozkładu jazdy", "search-author": "Nick autora rozkładu jazdy",
"search-issuedFrom": "Sceneria początkowa", "search-issuedFrom": "Sceneria początkowa",
"search-via": "Przez scenerię", "search-via": "Przez scenerię",
+12
View File
@@ -0,0 +1,12 @@
import { defineComponent } from 'vue';
export default defineComponent({
methods: {
getCategoryExplanation(categoryCode: string) {
const categoryKey = categoryCode.slice(0, 2);
const vehicleTypeKey = categoryCode.slice(-1);
return `${this.$t('categories.' + categoryKey)}\n(${this.$t('categories.' + vehicleTypeKey)})`;
}
}
});
+6 -2
View File
@@ -104,7 +104,7 @@ export const useMainStore = defineStore('mainStore', {
arrivalRouteExt: arrival, arrivalRouteExt: arrival,
departureRouteExt: departure, departureRouteExt: departure,
stationName: station.split(' ').slice(0, -1).join(' '), stationName: station.split(' ').slice(0, -1).join(' '),
stationHash: station.split(' ').slice(-1).join(' ') stationHash: station.split(' ').slice(-1).join(' ').replace('.sc', '')
}; };
}) })
} }
@@ -281,7 +281,11 @@ export const useMainStore = defineStore('mainStore', {
if (!scheduledTrains) return; if (!scheduledTrains) return;
scheduledTrains.forEach(({ train, checkpointStop, timetablePathElement, ...v }) => { scheduledTrains.forEach(({ train, checkpointStop, timetablePathElement, ...v }) => {
if (scenery.name != timetablePathElement.stationName) return; if (
scenery.name != timetablePathElement.stationName &&
scenery.hash != timetablePathElement.stationHash
)
return;
scenery.scheduledTrains.push({ train, checkpointStop, timetablePathElement, ...v }); scenery.scheduledTrains.push({ train, checkpointStop, timetablePathElement, ...v });
+4
View File
@@ -308,6 +308,10 @@ a.a-button {
z-index: 100; z-index: 100;
} }
.tooltip-help {
cursor: help;
}
@include smallScreen { @include smallScreen {
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 0.5em; width: 0.5em;
+4 -1
View File
@@ -267,7 +267,10 @@ export default defineComponent({
const timestampTo = timestampFrom ? timestampFrom + 86400000 : undefined; const timestampTo = timestampFrom ? timestampFrom + 86400000 : undefined;
if (dispatcher) queries.push(`dispatcherName=${dispatcher}`); if (dispatcher) queries.push(`dispatcherName=${dispatcher}`);
if (station) queries.push(`stationName=${station}`);
if (station.startsWith("#")) queries.push(`stationHash=${station.slice(1)}`);
else if (station.length > 0) queries.push(`stationName=${station}`);
if (timestampFrom && timestampTo) if (timestampFrom && timestampTo)
queries.push(`timestampFrom=${timestampFrom}`, `timestampTo=${timestampTo}`); queries.push(`timestampFrom=${timestampFrom}`, `timestampTo=${timestampTo}`);