Files
ComfyUI_frontend/src/components/rightSidePanel/info/TabInfo.vue
Rizumu Ayaka 68274134c8 feat: right side panel (#6952)
<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>
2025-12-02 22:55:24 -07:00

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>