obsługa niezaładowanych miniaturek pojazdów

This commit is contained in:
2023-10-01 01:41:14 +02:00
parent f60263c923
commit 77e6b20d0c
18 changed files with 116 additions and 51 deletions
+1 -2
View File
@@ -15,12 +15,11 @@ export default interface Train {
driverLevel: number;
currentStationName: string;
currentStationHash: string;
locoURL: string;
locoType: string;
online: boolean;
lastSeen: number;
region: string;
cars: string[];
stockList: string[];
isTimeout: boolean;
isSupporter: boolean;
+1 -1
View File
@@ -11,7 +11,7 @@ export default interface StationAPIData {
lastSeen: number;
dispatcherExp: number;
nameFromHeader: string;
spawnString: string;
spawnString: string | null;
networkConnectionString: string;
isOnline: number;
dispatcherRate: number;
@@ -0,0 +1,13 @@
export interface RollingStockGithubData {
usage: Record<string, string>;
info: RollingStockInfo;
}
export interface RollingStockInfo {
'loco-e': [string, string, string, string, boolean][];
'loco-s': [string, string, string, string, boolean][];
'loco-szt': [string, string, string, string, boolean][];
'loco-ezt': [string, string, string, string, boolean][];
'car-passenger': [string, string, boolean, boolean, string][];
'car-cargo': [string, string, boolean, boolean, string][];
}
+2 -1
View File
@@ -6,7 +6,7 @@ import Station from '../Station';
import Train from '../Train';
import { DispatcherStatsAPIData } from '../api/DispatcherStatsAPIData';
import { DriverStatsAPIData } from '../api/DriverStatsAPIData';
import { Ref } from 'vue';
import { RollingStockGithubData } from '../github_api/StockInfoGithubData';
export type Availability = 'default' | 'unavailable' | 'nonPublic' | 'abandoned' | 'nonDefault';
@@ -14,6 +14,7 @@ export interface StoreState {
stationList: Station[];
trainList: Train[];
apiData: APIData;
rollingStockData?: RollingStockGithubData;
lastDispatcherStatuses: { hash: string; statusTimestamp: number; statusID: string }[];
+1 -1
View File
@@ -1,6 +1,6 @@
export const URLs = {
stacjownikAPI:
import.meta.env.VITE_APP_API_DEV == 1 && !import.meta.env.PROD
import.meta.env.VITE_APP_API_DEV === "1" && !import.meta.env.PROD
? 'http://localhost:3001'
: 'https://stacjownik.spythere.pl',
stacjownikAPIDev: 'localhost:3000',