rozszerzony wybór regionów przez URL; poprawki headerów

This commit is contained in:
2023-11-02 17:40:31 +01:00
parent 1d7fc2955f
commit d9da49a867
5 changed files with 108 additions and 145 deletions
+5 -5
View File
@@ -185,7 +185,8 @@ export const useStore = defineStore('store', {
scheduledTrainCount: {
all: uniqueScheduledTrains.length,
confirmed: uniqueScheduledTrains.filter((train) => train.stopInfo.confirmed).length,
unconfirmed: uniqueScheduledTrains.filter((train) => !train.stopInfo.confirmed).length
unconfirmed: uniqueScheduledTrains.filter((train) => !train.stopInfo.confirmed)
.length
}
});
@@ -271,12 +272,11 @@ export const useStore = defineStore('store', {
const socket = io(URLs.stacjownikAPI, {
transports: ['websocket', 'polling'],
rememberUpgrade: true,
reconnection: true,
extraHeaders: {
version: packageInfo.version
}
reconnection: true
});
socket.emit('CONNECTION', { version: packageInfo.version });
socket.on('connect_error', () => {
this.dataStatuses.connection = DataStatus.Error;
});