From 1a3cf4c3f38b4b90f46e95cc3b123fdc1b3708b8 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Fri, 23 Aug 2024 18:52:45 -0400 Subject: [PATCH] Show node name and node id on flattened task outputs (#608) * wip * Show node name and node id --- .../sidebar/tabs/queue/TaskItem.vue | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/components/sidebar/tabs/queue/TaskItem.vue b/src/components/sidebar/tabs/queue/TaskItem.vue index 2ef270821..1d6772fe4 100644 --- a/src/components/sidebar/tabs/queue/TaskItem.vue +++ b/src/components/sidebar/tabs/queue/TaskItem.vue @@ -4,7 +4,7 @@ @@ -26,7 +26,10 @@
-
+
+ + {{ node?.type }} (#{{ node?.id }}) + @@ -55,6 +58,7 @@ import Button from 'primevue/button' import Tag from 'primevue/tag' import ResultItem from './ResultItem.vue' import { TaskItemDisplayStatus, type TaskItemImpl } from '@/stores/queueStore' +import { ComfyNode } from '@/types/comfyWorkflow' const props = defineProps<{ task: TaskItemImpl @@ -62,6 +66,15 @@ const props = defineProps<{ }>() const flatOutputs = props.task.flatOutputs +const coverResult = flatOutputs.length + ? props.task.previewOutput || flatOutputs[0] + : null +// Using `==` instead of `===` because NodeId can be a string or a number +const node: ComfyNode | null = flatOutputs.length + ? props.task.workflow.nodes.find( + (n: ComfyNode) => n.id == coverResult.nodeId + ) ?? null + : null const emit = defineEmits<{ (e: 'contextmenu', value: { task: TaskItemImpl; event: MouseEvent }): void @@ -149,6 +162,7 @@ const formatTime = (time?: number) => { padding: 0.6rem; display: flex; justify-content: space-between; + align-items: center; width: 100%; } @@ -159,4 +173,13 @@ are floating on top of images. */ border-radius: 6px; display: inline-flex; } + +.node-name-tag { + word-break: break-all; +} + +.status-tag-group { + display: flex; + flex-direction: column; +}