From 44d57ce041e32519e4f1abbd371ea3d0d7936964 Mon Sep 17 00:00:00 2001 From: Austin Mroz Date: Sat, 27 Sep 2025 12:23:45 -0500 Subject: [PATCH] Move widget configuration out of sidebar --- src/components/graph/SelectionToolbox.vue | 8 +- .../selectionToolbox/ConfigureSubgraph.vue | 24 +++ src/components/selectionbar/SubgraphNode.vue | 150 +++++++++--------- .../sidebarTabs/useSubgraphNodeTab.ts | 19 --- .../graph/subgraph/useSubgraphNodeDialog.ts | 21 +++ src/services/litegraphService.ts | 21 ++- src/stores/workspace/sidebarTabStore.ts | 2 - 7 files changed, 136 insertions(+), 109 deletions(-) create mode 100644 src/components/graph/selectionToolbox/ConfigureSubgraph.vue delete mode 100644 src/composables/sidebarTabs/useSubgraphNodeTab.ts create mode 100644 src/core/graph/subgraph/useSubgraphNodeDialog.ts diff --git a/src/components/graph/SelectionToolbox.vue b/src/components/graph/SelectionToolbox.vue index 9970c0b47..870bea2ba 100644 --- a/src/components/graph/SelectionToolbox.vue +++ b/src/components/graph/SelectionToolbox.vue @@ -22,7 +22,8 @@ - + + !!nodeDef.value) const showColorPicker = computed(() => hasAnySelection.value) const showConvertToSubgraph = computed(() => hasAnySelection.value) const showFrameNodes = computed(() => hasMultipleSelection.value) -const showPublishSubgraph = computed(() => isSingleSubgraph.value) +const showSubgraphButtons = computed(() => isSingleSubgraph.value) const showBypass = computed( () => @@ -130,7 +132,7 @@ const showAnyPrimaryActions = computed( showColorPicker.value || showConvertToSubgraph.value || showFrameNodes.value || - showPublishSubgraph.value + showSubgraphButtons.value ) const showAnyControlActions = computed(() => showBypass.value) diff --git a/src/components/graph/selectionToolbox/ConfigureSubgraph.vue b/src/components/graph/selectionToolbox/ConfigureSubgraph.vue new file mode 100644 index 000000000..00e8db986 --- /dev/null +++ b/src/components/graph/selectionToolbox/ConfigureSubgraph.vue @@ -0,0 +1,24 @@ + + + diff --git a/src/components/selectionbar/SubgraphNode.vue b/src/components/selectionbar/SubgraphNode.vue index 2af45a245..c032741dd 100644 --- a/src/components/selectionbar/SubgraphNode.vue +++ b/src/components/selectionbar/SubgraphNode.vue @@ -5,7 +5,6 @@ import draggable from 'vuedraggable' import SearchBox from '@/components/common/SearchBox.vue' import SubgraphNodeWidget from '@/components/selectionbar/SubgraphNodeWidget.vue' -import SidebarTabTemplate from '@/components/sidebar/tabs/SidebarTabTemplate.vue' import { type ProxyWidgetsProperty, parseProxyWidgets @@ -14,6 +13,7 @@ import type { LGraphNode } from '@/lib/litegraph/src/litegraph' import { SubgraphNode } from '@/lib/litegraph/src/subgraph/SubgraphNode' import type { IBaseWidget } from '@/lib/litegraph/src/types/widgets' import { useCanvasStore } from '@/renderer/core/canvas/canvasStore' +import { useDialogStore } from '@/stores/dialogStore' type WidgetItem = [LGraphNode, IBaseWidget] @@ -32,6 +32,7 @@ function toKey(item: WidgetItem) { const activeNode = computed(() => { const node = canvasStore.selectedItems[0] if (node instanceof SubgraphNode) return node + useDialogStore().closeDialog() return undefined }) @@ -184,85 +185,76 @@ const filteredActive = computed(() => { })