mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor(editor): Detangle ui store from settings store (no-changelog) (#16384)
This commit is contained in:
@@ -16,6 +16,8 @@ import SourceControlInitializationErrorMessage from '@/components/SourceControlI
|
||||
import { useSSOStore } from '@/stores/sso.store';
|
||||
import { EnterpriseEditionFeature } from '@/constants';
|
||||
import type { UserManagementAuthenticationMethod } from '@/Interface';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import type { BannerName } from '@n8n/api-types';
|
||||
|
||||
export const state = {
|
||||
initialized: false,
|
||||
@@ -35,6 +37,7 @@ export async function initializeCore() {
|
||||
const usersStore = useUsersStore();
|
||||
const versionsStore = useVersionsStore();
|
||||
const ssoStore = useSSOStore();
|
||||
const uiStore = useUIStore();
|
||||
|
||||
await settingsStore.initialize();
|
||||
|
||||
@@ -49,6 +52,20 @@ export async function initializeCore() {
|
||||
},
|
||||
});
|
||||
|
||||
const banners: BannerName[] = [];
|
||||
if (settingsStore.isEnterpriseFeatureEnabled.showNonProdBanner) {
|
||||
banners.push('NON_PRODUCTION_LICENSE');
|
||||
}
|
||||
if (
|
||||
!(settingsStore.settings.banners?.dismissed || []).includes('V1') &&
|
||||
settingsStore.settings.versionCli.startsWith('1.')
|
||||
) {
|
||||
banners.push('V1');
|
||||
}
|
||||
uiStore.initialize({
|
||||
banners,
|
||||
});
|
||||
|
||||
void useExternalHooks().run('app.mount');
|
||||
|
||||
if (!settingsStore.isPreviewMode) {
|
||||
|
||||
Reference in New Issue
Block a user