mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 05:48:11 +00:00
Poprawki
This commit is contained in:
@@ -271,7 +271,6 @@ export default defineComponent({
|
|||||||
padding: 0.5em 1em;
|
padding: 0.5em 1em;
|
||||||
border-radius: 0.75em 0.75em 0 0;
|
border-radius: 0.75em 0.75em 0 0;
|
||||||
|
|
||||||
font-size: 0.9em;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,9 +50,7 @@ const sortStations = (a: Station, b: Station, sorter: { index: number; dir: numb
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a.name.toLowerCase() >= b.name.toLowerCase()) return sorter.dir;
|
return sorter.dir == 1 ? a.name.localeCompare(b.name) : b.name.localeCompare(a.name);
|
||||||
|
|
||||||
return -sorter.dir;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const filterStations = (station: Station, filters: Filter) => {
|
const filterStations = (station: Station, filters: Filter) => {
|
||||||
|
|||||||
+5
-4
@@ -322,7 +322,9 @@ export const useStore = defineStore('store', {
|
|||||||
|
|
||||||
connectToWebsocket() {
|
connectToWebsocket() {
|
||||||
const socket = io(
|
const socket = io(
|
||||||
process.env.NODE_ENV !== 'production' && process.env.DEV_API == 1 ? URLs.stacjownikAPIDev : URLs.stacjownikAPI,
|
process.env.NODE_ENV !== 'production' && process.env.VUE_APP_WS_DEV == 1
|
||||||
|
? URLs.stacjownikAPIDev
|
||||||
|
: URLs.stacjownikAPI,
|
||||||
{
|
{
|
||||||
transports: ['websocket', 'polling'],
|
transports: ['websocket', 'polling'],
|
||||||
rememberUpgrade: true,
|
rememberUpgrade: true,
|
||||||
@@ -333,6 +335,8 @@ export const useStore = defineStore('store', {
|
|||||||
socket.on('UPDATE', (data: APIData) => {
|
socket.on('UPDATE', (data: APIData) => {
|
||||||
this.apiData = data;
|
this.apiData = data;
|
||||||
|
|
||||||
|
console.dir(data);
|
||||||
|
|
||||||
this.setOnlineData();
|
this.setOnlineData();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -367,9 +371,6 @@ export const useStore = defineStore('store', {
|
|||||||
|
|
||||||
this.setTrainsOnlineData();
|
this.setTrainsOnlineData();
|
||||||
this.setStationsOnlineInfo();
|
this.setStationsOnlineInfo();
|
||||||
|
|
||||||
console.log("Loading");
|
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -37,10 +37,6 @@ export interface APIData {
|
|||||||
stations?: StationAPIData[];
|
stations?: StationAPIData[];
|
||||||
dispatchers?: string[][];
|
dispatchers?: string[][];
|
||||||
trains?: TrainAPIData[];
|
trains?: TrainAPIData[];
|
||||||
|
|
||||||
stationsSWDRStatus: string;
|
|
||||||
trainsSWDRStatus: string;
|
|
||||||
dispatchersSWDRStatus: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StationJSONData {
|
export interface StationJSONData {
|
||||||
|
|||||||
Reference in New Issue
Block a user