diff --git a/packages/frontend/@n8n/i18n/src/locales/en.json b/packages/frontend/@n8n/i18n/src/locales/en.json index c2df6d004bf..2ddb23a5ba1 100644 --- a/packages/frontend/@n8n/i18n/src/locales/en.json +++ b/packages/frontend/@n8n/i18n/src/locales/en.json @@ -3098,7 +3098,7 @@ "workflows.empty.preBuiltAgents": "Try a pre-built agent", "workflows.empty.shared-with-me": "No {resource} has been shared with you", "workflows.empty.shared-with-me.link": "Back to Personal", - "workflows.empty.readyToRunV2": "Try an AI workflow", + "workflows.empty.readyToRun": "Try an AI workflow", "workflows.list.easyAI": "Test the power of AI in n8n with this simple AI Agent Workflow", "workflows.list.error.fetching.one": "Error fetching workflow", "workflows.list.error.fetching": "Error fetching workflows", diff --git a/packages/frontend/@n8n/stores/src/constants.ts b/packages/frontend/@n8n/stores/src/constants.ts index 3f3e32ad60f..3d63dc969cb 100644 --- a/packages/frontend/@n8n/stores/src/constants.ts +++ b/packages/frontend/@n8n/stores/src/constants.ts @@ -40,6 +40,7 @@ export const STORES = { EXPERIMENT_READY_TO_RUN_WORKFLOWS_V2: 'readyToRunWorkflowsV2', EXPERIMENT_TEMPLATE_RECO_V2: 'templateRecoV2', PERSONALIZED_TEMPLATES_V3: 'personalizedTemplatesV3', + READY_TO_RUN: 'readyToRun', TEMPLATES_DATA_QUALITY: 'templatesDataQuality', BANNERS: 'banners', CONSENT: 'consent', diff --git a/packages/frontend/editor-ui/src/experiments/readyToRunWorkflowsV2/components/SimplifiedEmptyLayout.vue b/packages/frontend/editor-ui/src/app/components/layouts/EmptyStateLayout.vue similarity index 86% rename from packages/frontend/editor-ui/src/experiments/readyToRunWorkflowsV2/components/SimplifiedEmptyLayout.vue rename to packages/frontend/editor-ui/src/app/components/layouts/EmptyStateLayout.vue index a7ca9475cdf..69c92cefb3c 100644 --- a/packages/frontend/editor-ui/src/experiments/readyToRunWorkflowsV2/components/SimplifiedEmptyLayout.vue +++ b/packages/frontend/editor-ui/src/app/components/layouts/EmptyStateLayout.vue @@ -9,9 +9,13 @@ import { useSourceControlStore } from '@/features/integrations/sourceControl.ee/ import { getResourcePermissions } from '@n8n/permissions'; import { useProjectPages } from '@/features/collaboration/projects/composables/useProjectPages'; import { useToast } from '@/app/composables/useToast'; -import { useReadyToRunWorkflowsV2Store } from '../stores/readyToRunWorkflowsV2.store'; +import { useReadyToRunStore } from '@/features/workflows/readyToRun/stores/readyToRun.store'; import type { IUser } from 'n8n-workflow'; +const emit = defineEmits<{ + 'click:add': []; +}>(); + const route = useRoute(); const i18n = useI18n(); const toast = useToast(); @@ -19,7 +23,7 @@ const usersStore = useUsersStore(); const projectsStore = useProjectsStore(); const sourceControlStore = useSourceControlStore(); const projectPages = useProjectPages(); -const readyToRunWorkflowsV2Store = useReadyToRunWorkflowsV2Store(); +const readyToRunStore = useReadyToRunStore(); const isLoadingReadyToRun = ref(false); @@ -43,18 +47,14 @@ const emptyListDescription = computed(() => { } }); -const showReadyToRunV2Card = computed(() => { +const showReadyToRunCard = computed(() => { return ( isLoadingReadyToRun.value || - readyToRunWorkflowsV2Store.getCardVisibility( - projectPermissions.value.workflow.create, - readOnlyEnv.value, - false, // loading is false in simplified layout - ) + readyToRunStore.getCardVisibility(projectPermissions.value.workflow.create, readOnlyEnv.value) ); }); -const handleReadyToRunV2Click = async () => { +const handleReadyToRunClick = async () => { if (isLoadingReadyToRun.value) return; isLoadingReadyToRun.value = true; @@ -63,7 +63,7 @@ const handleReadyToRunV2Click = async () => { : (route.params.projectId as string); try { - await readyToRunWorkflowsV2Store.claimCreditsAndOpenWorkflow( + await readyToRunStore.claimCreditsAndOpenWorkflow( 'card', route.params.folderId as string, projectId, @@ -77,14 +77,10 @@ const handleReadyToRunV2Click = async () => { const addWorkflow = () => { emit('click:add'); }; - -const emit = defineEmits<{ - 'click:add': []; -}>();