|
@@ -1,5 +1,5 @@
|
|
<template>
|
|
<template>
|
|
- <div v-if="workflow" class="flex h-screen">
|
|
|
|
|
|
+ <div v-if="workflow" class="flex" style="height: calc(100vh - 40px)">
|
|
<div
|
|
<div
|
|
v-if="state.showSidebar && haveEditAccess"
|
|
v-if="state.showSidebar && haveEditAccess"
|
|
:class="
|
|
:class="
|
|
@@ -167,7 +167,8 @@
|
|
:data="editorData"
|
|
:data="editorData"
|
|
:disabled="isTeamWorkflow && !haveEditAccess"
|
|
:disabled="isTeamWorkflow && !haveEditAccess"
|
|
:class="{ 'animate-blocks': state.animateBlocks }"
|
|
:class="{ 'animate-blocks': state.animateBlocks }"
|
|
- class="workflow-editor h-screen focus:outline-none"
|
|
|
|
|
|
+ class="workflow-editor focus:outline-none"
|
|
|
|
+ style="height: calc(100vh - 40px)"
|
|
tabindex="0"
|
|
tabindex="0"
|
|
@init="onEditorInit"
|
|
@init="onEditorInit"
|
|
@edit="initEditBlock"
|
|
@edit="initEditBlock"
|
|
@@ -295,8 +296,6 @@ import {
|
|
computed,
|
|
computed,
|
|
onMounted,
|
|
onMounted,
|
|
shallowRef,
|
|
shallowRef,
|
|
- onActivated,
|
|
|
|
- onDeactivated,
|
|
|
|
onBeforeUnmount,
|
|
onBeforeUnmount,
|
|
} from 'vue';
|
|
} from 'vue';
|
|
import cloneDeep from 'lodash.clonedeep';
|
|
import cloneDeep from 'lodash.clonedeep';
|
|
@@ -1527,7 +1526,6 @@ function checkWorkflowUpdate() {
|
|
}
|
|
}
|
|
/* eslint-disable consistent-return */
|
|
/* eslint-disable consistent-return */
|
|
function onBeforeLeave() {
|
|
function onBeforeLeave() {
|
|
- document.documentElement.classList.remove('scroll');
|
|
|
|
updateHostedWorkflow();
|
|
updateHostedWorkflow();
|
|
|
|
|
|
const dataNotChanged = !state.dataChanged || !haveEditAccess.value;
|
|
const dataNotChanged = !state.dataChanged || !haveEditAccess.value;
|
|
@@ -1574,20 +1572,12 @@ watch(
|
|
);
|
|
);
|
|
|
|
|
|
onBeforeRouteLeave(onBeforeLeave);
|
|
onBeforeRouteLeave(onBeforeLeave);
|
|
-onActivated(() => {
|
|
|
|
- document.documentElement.classList.add('scroll');
|
|
|
|
-});
|
|
|
|
-onDeactivated(() => {
|
|
|
|
- document.documentElement.classList.remove('scroll');
|
|
|
|
-});
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
if (!workflow.value) {
|
|
if (!workflow.value) {
|
|
router.replace(isPackage ? '/packages' : '/');
|
|
router.replace(isPackage ? '/packages' : '/');
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
- document.documentElement.classList.add('scroll');
|
|
|
|
-
|
|
|
|
const sidebarState =
|
|
const sidebarState =
|
|
JSON.parse(localStorage.getItem('workflow:sidebar')) ?? true;
|
|
JSON.parse(localStorage.getItem('workflow:sidebar')) ?? true;
|
|
state.showSidebar = sidebarState;
|
|
state.showSidebar = sidebarState;
|
|
@@ -1616,8 +1606,6 @@ onMounted(() => {
|
|
initAutocomplete();
|
|
initAutocomplete();
|
|
});
|
|
});
|
|
onBeforeUnmount(() => {
|
|
onBeforeUnmount(() => {
|
|
- document.documentElement.classList.remove('scroll');
|
|
|
|
-
|
|
|
|
if (isPackage && workflow.value.isExternal) return;
|
|
if (isPackage && workflow.value.isExternal) return;
|
|
updateHostedWorkflow();
|
|
updateHostedWorkflow();
|
|
});
|
|
});
|