diff --git a/packages/editor-ui/src/components/WorkflowPreview.vue b/packages/editor-ui/src/components/WorkflowPreview.vue index a2cf4d916d..791a7b699f 100644 --- a/packages/editor-ui/src/components/WorkflowPreview.vue +++ b/packages/editor-ui/src/components/WorkflowPreview.vue @@ -14,7 +14,7 @@ [$style.show]: this.showPreview, }" ref="preview_iframe" - src="/workflows/demo" + :src="`${rootStore.baseUrl}workflows/demo`" @mouseenter="onMouseEnter" @mouseleave="onMouseLeave" > @@ -25,6 +25,8 @@ import mixins from 'vue-typed-mixins'; import { showMessage } from '@/components/mixins/showMessage'; import { IWorkflowDb } from '../Interface'; +import { mapStores } from 'pinia'; +import { useRootStore } from '@/stores/n8nRootStore'; export default mixins(showMessage).extend({ name: 'WorkflowPreview', @@ -64,6 +66,9 @@ export default mixins(showMessage).extend({ }; }, computed: { + ...mapStores( + useRootStore, + ), showPreview(): boolean { return !this.loading && ( diff --git a/packages/editor-ui/src/stores/n8nRootStore.ts b/packages/editor-ui/src/stores/n8nRootStore.ts index 37cac9c669..77710ff739 100644 --- a/packages/editor-ui/src/stores/n8nRootStore.ts +++ b/packages/editor-ui/src/stores/n8nRootStore.ts @@ -1,5 +1,5 @@ import { STORES } from '@/constants'; -import { INodeUi, IRestApiContext, RootState } from '@/Interface'; +import { IRestApiContext, RootState } from '@/Interface'; import { IDataObject } from 'n8n-workflow'; import { defineStore } from 'pinia'; import Vue from 'vue';