n8n-editor-ui
Version:
Workflow Editor UI for n8n
92 lines (91 loc) • 4.41 kB
JavaScript
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 { _t as useI18n } from "./_MapCache-ficiegRb.js";
import { Sn as N8nButton_default, xn as N8nText_default, yn as N8nHeading_default } from "./src-DgvumQTi.js";
import "./en-CF30SCh2.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-B1HVeveJ.js";
import { N as useWorkflowsStore, oa as useUIStore } from "./builder.store-sBTWwxRU.js";
import "./empty-BuGRxzl4.js";
import "./sanitize-html-Cc45ZKm8.js";
import "./CalendarDate-zWqgZMlk.js";
import "./path-browserify-BtCDmZ3_.js";
import { Ro as VIEWS } from "./constants-BbpucWL4.js";
import "./merge-k8vSyyXH.js";
import "./_baseOrderBy-B_6CV8x6.js";
import "./dateformat-CM9k0--B.js";
import "./useDebounce-Bnb8W2LR.js";
import { t as WorkflowExecutionsInfoAccordion_default } from "./WorkflowExecutionsInfoAccordion-De8z4J-p.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() {
const workflowId = workflowsStore.workflowId || route.params.name;
uiStore.addFirstStepOnLoad = true;
router.push({
name: VIEWS.WORKFLOW,
params: { name: workflowId },
query: { ...route.query }
});
}
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 };