update: auth & update modal

This commit is contained in:
2023-01-30 17:48:28 +01:00
parent ef72c5f129
commit 07e7995ad5
8 changed files with 880 additions and 753 deletions
+31 -28
View File
@@ -1,28 +1,31 @@
import { defineStore } from 'pinia';
import { Availability, ChangeProp, HeaderTypes, IStore } from './types/types';
import { getAvailabilityValue } from './types/typeUitls';
export const useStore = defineStore('store', {
state: () =>
({
dataState: 'LOADING',
unsavedChanges: false,
stationList: [],
backupList: [],
stationsToRemove: [],
searchedSceneryName: '',
changeList: [],
newStationsCount: 0,
routesModalVisible: true,
currentStation: null,
selectedStationName: '',
token: null,
user: null,
isAuthorized: false,
notifyDiscord: true,
alertMessage: '',
confirmMessage: '',
changesResponse: [],
} as IStore),
});
import { defineStore } from 'pinia';
import { AuthState, Availability, ChangeProp, HeaderTypes, IStore } from './types/types';
import { getAvailabilityValue } from './types/typeUitls';
export const useStore = defineStore('store', {
state: () =>
({
dataState: 'LOADING',
authState: AuthState.LOADING,
unsavedChanges: false,
stationList: [],
backupList: [],
stationsToRemove: [],
searchedSceneryName: '',
changeList: [],
newStationsCount: 0,
routesModalVisible: true,
currentStation: null,
selectedStationName: '',
token: null,
user: null,
isAuthorized: false,
notifyDiscord: true,
alertMessage: '',
confirmMessage: '',
changesResponse: [],
} as IStore),
});