fix(editor): Use base path in workflow preview component URL (#4560)

🐛 Fix for workflow preview component URL
This commit is contained in:
Milorad FIlipović 2022-11-09 16:46:13 +01:00 committed by GitHub
parent 536c834313
commit db163b71b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -14,7 +14,7 @@
[$style.show]: this.showPreview,
}"
ref="preview_iframe"
src="/workflows/demo"
:src="`${rootStore.baseUrl}workflows/demo`"
@mouseenter="onMouseEnter"
@mouseleave="onMouseLeave"
></iframe>
@ -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 &&
(

View file

@ -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';