refactor(editor): Migrate header WorkflowDetails to composition api (no-changelog) (#9186)

This commit is contained in:
Alex Grozav
2024-04-29 07:53:42 +03:00
committed by GitHub
parent 442aaba116
commit 1c261f85a3
11 changed files with 756 additions and 635 deletions

View File

@@ -2,7 +2,7 @@
<div>
<div :class="{ 'main-header': true, expanded: !uiStore.sidebarMenuCollapsed }">
<div v-show="!hideMenuBar" class="top-menu">
<WorkflowDetails :read-only="readOnly" />
<WorkflowDetails v-if="workflow?.name" :workflow="workflow" :read-only="readOnly" />
<TabBar
v-if="onWorkflowPage"
:items="tabBarItems"
@@ -27,7 +27,7 @@ import {
STICKY_NODE_TYPE,
VIEWS,
} from '@/constants';
import type { INodeUi, ITabBarItem } from '@/Interface';
import type { INodeUi, ITabBarItem, IWorkflowDb } from '@/Interface';
import { useNDVStore } from '@/stores/ndv.store';
import { useSourceControlStore } from '@/stores/sourceControl.store';
import { useUIStore } from '@/stores/ui.store';
@@ -75,6 +75,9 @@ export default defineComponent({
hideMenuBar(): boolean {
return Boolean(this.activeNode && this.activeNode.type !== STICKY_NODE_TYPE);
},
workflow(): IWorkflowDb {
return this.workflowsStore.workflow;
},
workflowName(): string {
return this.workflowsStore.workflowName;
},