mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-02 11:40:00 +00:00
<img width="1183" height="809" alt="CleanShot 2025-11-26 at 16 01 15" src="https://github.com/user-attachments/assets/c14dc5c3-a672-4dcd-917d-14f16310188e" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6952-feat-right-side-panel-2b76d73d36508112b121c283a479f42a) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>
38 lines
909 B
Vue
38 lines
909 B
Vue
<script setup lang="ts">
|
|
import { computed, watch } 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 props = defineProps<{
|
|
nodes: LGraphNode[]
|
|
}>()
|
|
const node = computed(() => props.nodes[0])
|
|
|
|
const nodeDefStore = useNodeDefStore()
|
|
const nodeHelpStore = useNodeHelpStore()
|
|
|
|
const nodeInfo = computed(() => {
|
|
return nodeDefStore.fromLGraphNode(node.value)
|
|
})
|
|
|
|
// Open node help when the selected node changes
|
|
watch(
|
|
nodeInfo,
|
|
(info) => {
|
|
if (info) {
|
|
nodeHelpStore.openHelp(info)
|
|
}
|
|
},
|
|
{ immediate: true }
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<div v-if="nodeInfo" class="rounded-lg bg-interface-surface p-3">
|
|
<NodeHelpContent :node="nodeInfo" />
|
|
</div>
|
|
</template>
|