mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-27 10:43:48 +02:00
Fix database upgrade
This commit is contained in:
@@ -17,12 +17,14 @@ import { useNotificationStore } from './notification';
|
||||
import { useAdvancedSettingsStore } from './settings/advanced';
|
||||
import { useUpdateLoopStore } from './updateLoop';
|
||||
import { useUserStore } from './user';
|
||||
import { useVrcxStore } from './vrcx';
|
||||
|
||||
export const useAuthStore = defineStore('Auth', () => {
|
||||
const advancedSettingsStore = useAdvancedSettingsStore();
|
||||
const notificationStore = useNotificationStore();
|
||||
const userStore = useUserStore();
|
||||
const updateLoopStore = useUpdateLoopStore();
|
||||
const vrcxStore = useVrcxStore();
|
||||
|
||||
const { t } = useI18n();
|
||||
const state = reactive({
|
||||
@@ -138,6 +140,13 @@ export const useAuthStore = defineStore('Auth', () => {
|
||||
}
|
||||
});
|
||||
|
||||
const attemptingAutoLogin = computed({
|
||||
get: () => state.attemptingAutoLogin,
|
||||
set: (value) => {
|
||||
state.attemptingAutoLogin = value;
|
||||
}
|
||||
});
|
||||
|
||||
watch(
|
||||
[() => watchState.isLoggedIn, () => userStore.currentUser],
|
||||
([isLoggedIn, currentUser]) => {
|
||||
@@ -859,6 +868,7 @@ export const useAuthStore = defineStore('Auth', () => {
|
||||
await database.initUserTables(userStore.currentUser.id);
|
||||
watchState.isLoggedIn = true;
|
||||
AppApi.CheckGameRunning(); // restore state from hot-reload
|
||||
vrcxStore.updateDatabaseVersion();
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -869,6 +879,7 @@ export const useAuthStore = defineStore('Auth', () => {
|
||||
twoFactorAuthDialogVisible,
|
||||
cachedConfig,
|
||||
enableCustomEndpoint,
|
||||
attemptingAutoLogin,
|
||||
|
||||
clearCookiesTryLogin,
|
||||
resendEmail2fa,
|
||||
|
||||
Reference in New Issue
Block a user