mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
## Summary - Code cleanup - Copy, padding, color, alignment of components - Subgraph Edit mode changes - Partial fix for the Node Info location (need to do context menu still) - Editing node title ### Still to-do - Bi-directionality in values ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7137-WIP-Cleanup-Properties-Panel-2be6d73d3650813e9430f6bcb09dfb4d) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>
37 lines
887 B
Vue
37 lines
887 B
Vue
<script setup lang="ts">
|
|
import { whenever } from '@vueuse/core'
|
|
import { computed } from 'vue'
|
|
|
|
import NodeHelpContent from '@/components/node/NodeHelpContent.vue'
|
|
import type { LGraphNode } from '@/lib/litegraph/src/litegraph'
|
|
import { useNodeDefStore } from '@/stores/nodeDefStore'
|
|
import { useNodeHelpStore } from '@/stores/workspace/nodeHelpStore'
|
|
|
|
const { nodes } = defineProps<{
|
|
nodes: LGraphNode[]
|
|
}>()
|
|
const node = computed(() => nodes[0])
|
|
|
|
const nodeDefStore = useNodeDefStore()
|
|
const nodeHelpStore = useNodeHelpStore()
|
|
|
|
const nodeInfo = computed(() => {
|
|
return nodeDefStore.fromLGraphNode(node.value)
|
|
})
|
|
|
|
// Open node help when the selected node changes
|
|
whenever(
|
|
nodeInfo,
|
|
(info) => {
|
|
nodeHelpStore.openHelp(info)
|
|
},
|
|
{ immediate: true }
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<div v-if="nodeInfo" class="p-3">
|
|
<NodeHelpContent :node="nodeInfo" />
|
|
</div>
|
|
</template>
|