refactor(editor): Extract root store into @n8n/stores package (no-changelog) (#15412)

This commit is contained in:
Alex Grozav
2025-05-16 14:18:16 +03:00
committed by GitHub
parent 907485d016
commit de4c5fc716
161 changed files with 530 additions and 318 deletions

View File

@@ -1,13 +1,14 @@
import { computed, reactive } from 'vue';
import { defineStore } from 'pinia';
import type { CloudPlanState } from '@/Interface';
import { useRootStore } from '@/stores/root.store';
import { useRootStore } from '@n8n/stores/useRootStore';
import { useSettingsStore } from '@/stores/settings.store';
import { useUIStore } from '@/stores/ui.store';
import { useUsersStore } from '@/stores/users.store';
import { getAdminPanelLoginCode, getCurrentPlan, getCurrentUsage } from '@/api/cloudPlans';
import { DateTime } from 'luxon';
import { CLOUD_TRIAL_CHECK_INTERVAL, STORES } from '@/constants';
import { CLOUD_TRIAL_CHECK_INTERVAL } from '@/constants';
import { STORES } from '@n8n/stores';
import { hasPermission } from '@/utils/rbac/permissions';
const DEFAULT_STATE: CloudPlanState = {
@@ -167,9 +168,7 @@ export const useCloudPlanStore = defineStore(STORES.CLOUD_PLAN, () => {
state.initialized = true;
};
const generateCloudDashboardAutoLoginLink = async (data: {
redirectionPath: string;
}) => {
const generateCloudDashboardAutoLoginLink = async (data: { redirectionPath: string }) => {
const searchParams = new URLSearchParams();
const adminPanelHost = new URL(window.location.href).host.split('.').slice(1).join('.');