UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

110 lines (109 loc) 5.02 kB
import { C as computed, Cn as toDisplayString, D as createElementBlock, E as createCommentVNode, Gt as unref, M as createVNode, P as defineComponent, bt as withCtx, et as openBlock, j as createTextVNode, vn as normalizeClass } from "./vue.runtime.esm-bundler-tP5dCd7J.js"; import { gt as useI18n } from "./_MapCache-B159LOu5.js"; import { Hn as N8nButton_default, Vn as N8nText_default, zn as N8nHeading_default } from "./src-BW7zuOU1.js"; import "./en-b3uD8cvU.js"; import "./preload-helper-CR0ecmWK.js"; import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BwBpWJRZ.js"; import { v as useRoute, y as useRouter } from "./truncate-Dc5upPom.js"; import "./icon-MZ_3fB_h.js"; import "./overlay-CftFqN-S.js"; import "./empty-4-N75rxI.js"; import "./useMessage-C1bozAQq.js"; import { Fi as useUIStore, o as useWorkflowsStore } from "./useTelemetry-C797TaYa.js"; import "./useToast-ZaUhbG9w.js"; import "./sanitize-html-CgpOSgtK.js"; import "./CalendarDate-DxkU3CHY.js"; import "./path-browserify-B5h_dP_u.js"; import { Io as VIEWS, s as PLACEHOLDER_EMPTY_WORKFLOW_ID } from "./constants-CX1ozgFz.js"; import "./merge-BArJwbQo.js"; import "./_baseOrderBy-DL6Sy5xK.js"; import "./dateformat-CMLc6OKJ.js"; import "./useDebounce-RgPaX171.js"; import "./useExternalHooks-CYMS6JpD.js"; import "./useStyles-DhM0cpS7.js"; import "./npsSurvey.store-BuKohzKX.js"; import "./cloudPlan.store-nppjm48S.js"; import "./templates.store-CSx5YxpE.js"; import "./focusPanel.store-Dys3muoU.js"; import "./useWorkflowSaving-D0h-y5mZ.js"; import { t as WorkflowExecutionsInfoAccordion_default } from "./WorkflowExecutionsInfoAccordion-ndGGbZZU.js"; var _hoisted_1 = { key: 0, "data-test-id": "workflow-execution-no-trigger-content" }; var _hoisted_2 = { key: 1, "data-test-id": "workflow-execution-no-content" }; var WorkflowExecutionsLandingPage_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({ __name: "WorkflowExecutionsLandingPage", setup(__props) { const router = useRouter(); const route = useRoute(); const locale = useI18n(); const uiStore = useUIStore(); const workflowsStore = useWorkflowsStore(); const executionCount = computed(() => workflowsStore.currentWorkflowExecutions.length); const containsTrigger = computed(() => workflowsStore.workflowTriggerNodes.length > 0); function onSetupFirstStep() { uiStore.addFirstStepOnLoad = true; const workflowRoute = getWorkflowRoute(); router.push(workflowRoute); } function getWorkflowRoute() { const workflowId = workflowsStore.workflowId || route.params.name; if (workflowId === "__EMPTY__") return { name: VIEWS.NEW_WORKFLOW, params: {} }; else return { name: VIEWS.WORKFLOW, params: { name: workflowId } }; } return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass(["workflow-executions-container", _ctx.$style.container]) }, [executionCount.value === 0 ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass([_ctx.$style.messageContainer, _ctx.$style.noExecutionsMessage]) }, [!containsTrigger.value ? (openBlock(), createElementBlock("div", _hoisted_1, [ createVNode(unref(N8nHeading_default), { tag: "h2", size: "xlarge", color: "text-dark", class: "mb-2xs" }, { default: withCtx(() => [createTextVNode(toDisplayString(unref(locale).baseText("executionsLandingPage.emptyState.noTrigger.heading")), 1)]), _: 1 }), createVNode(unref(N8nText_default), { size: "medium" }, { default: withCtx(() => [createTextVNode(toDisplayString(unref(locale).baseText("executionsLandingPage.emptyState.message")), 1)]), _: 1 }), createVNode(unref(N8nButton_default), { class: "mt-l", type: "tertiary", size: "large", onClick: onSetupFirstStep }, { default: withCtx(() => [createTextVNode(toDisplayString(unref(locale).baseText("executionsLandingPage.emptyState.noTrigger.buttonText")), 1)]), _: 1 }) ])) : (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(N8nHeading_default), { tag: "h2", size: "xlarge", color: "text-dark", class: "mb-2xs" }, { default: withCtx(() => [createTextVNode(toDisplayString(unref(locale).baseText("executionsLandingPage.emptyState.heading")), 1)]), _: 1 }), createVNode(WorkflowExecutionsInfoAccordion_default)]))], 2)) : createCommentVNode("", true)], 2); }; } }); var WorkflowExecutionsLandingPage_vue_vue_type_style_index_0_lang_module_default = { container: "_container_1ofdn_123", messageContainer: "_messageContainer_1ofdn_133", icon: "_icon_1ofdn_144" }; var WorkflowExecutionsLandingPage_default = /* @__PURE__ */ __plugin_vue_export_helper_default(WorkflowExecutionsLandingPage_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": WorkflowExecutionsLandingPage_vue_vue_type_style_index_0_lang_module_default }]]); export { WorkflowExecutionsLandingPage_default as default };