fix(editor): Move versions check to init function and refactor store (no-changelog) (#8067)

This commit is contained in:
Alex Grozav
2023-12-20 12:49:40 +02:00
committed by GitHub
parent faadfd6d4a
commit fcff34c401
10 changed files with 223 additions and 84 deletions

View File

@@ -5,6 +5,7 @@ import { useSettingsStore } from '@/stores/settings.store';
import { useSourceControlStore } from '@/stores/sourceControl.store';
import { useUsersStore } from '@/stores/users.store';
import { initializeCloudHooks } from '@/hooks/register';
import { useVersionsStore } from '@/stores/versions.store';
let coreInitialized = false;
let authenticatedFeaturesInitialized = false;
@@ -20,10 +21,13 @@ export async function initializeCore() {
const settingsStore = useSettingsStore();
const usersStore = useUsersStore();
const versionsStore = useVersionsStore();
await settingsStore.initialize();
await usersStore.initialize();
void versionsStore.checkForNewVersions();
if (settingsStore.isCloudDeployment) {
try {
await initializeCloudHooks();