mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
## Summary 1. Fixes nits for #5758 2. Adds some git ignores ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5763-Fixes-nits-for-5758-2796d73d36508192b3e6feecfcacf38b) by [Unito](https://www.unito.io) --------- Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -22,6 +22,8 @@ dist-ssr
|
||||
*.local
|
||||
# Claude configuration
|
||||
.claude/*.local.json
|
||||
.claude/*.local.md
|
||||
.claude/*.local.txt
|
||||
CLAUDE.local.md
|
||||
|
||||
# Editor directories and files
|
||||
|
||||
@@ -308,16 +308,20 @@ watch(
|
||||
const nodeErrors = lastNodeErrors?.[node.id]
|
||||
if (!nodeErrors) continue
|
||||
|
||||
let slotErrorsChanged = false
|
||||
for (const error of nodeErrors.errors) {
|
||||
if (!error.extra_info?.input_name) continue
|
||||
|
||||
const inputIndex = node.findInputSlot(error.extra_info.input_name)
|
||||
if (inputIndex === -1) continue
|
||||
|
||||
const validErrors = nodeErrors.errors.filter(
|
||||
(error) => error.extra_info?.input_name !== undefined
|
||||
)
|
||||
const slotErrorsChanged =
|
||||
validErrors.length > 0 &&
|
||||
validErrors.some((error) => {
|
||||
const inputName = error.extra_info!.input_name!
|
||||
const inputIndex = node.findInputSlot(inputName)
|
||||
if (inputIndex !== -1) {
|
||||
node.inputs[inputIndex].hasErrors = true
|
||||
slotErrorsChanged = true
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
// Trigger Vue node data update if slot errors changed
|
||||
if (slotErrorsChanged && comfyApp.graph.onTrigger) {
|
||||
|
||||
@@ -136,11 +136,7 @@ import { computed, inject, onErrorCaptured, onMounted, provide, ref } from 'vue'
|
||||
|
||||
import type { VueNodeData } from '@/composables/graph/useGraphNodeManager'
|
||||
import { useErrorHandling } from '@/composables/useErrorHandling'
|
||||
import {
|
||||
type INodeInputSlot,
|
||||
type INodeOutputSlot,
|
||||
LiteGraph
|
||||
} from '@/lib/litegraph/src/litegraph'
|
||||
import { LiteGraph } from '@/lib/litegraph/src/litegraph'
|
||||
import { useCanvasStore } from '@/renderer/core/canvas/canvasStore'
|
||||
import { useCanvasInteractions } from '@/renderer/core/canvas/useCanvasInteractions'
|
||||
import { TransformStateKey } from '@/renderer/core/layout/injectionKeys'
|
||||
@@ -205,18 +201,14 @@ const hasExecutionError = computed(
|
||||
|
||||
// Computed error states for styling
|
||||
const hasAnyError = computed((): boolean => {
|
||||
return (
|
||||
!!hasExecutionError.value ||
|
||||
!!nodeData.hasErrors ||
|
||||
!!error ||
|
||||
return !!(
|
||||
hasExecutionError.value ||
|
||||
nodeData.hasErrors ||
|
||||
error ||
|
||||
// Type assertions needed because VueNodeData.inputs/outputs are typed as unknown[]
|
||||
// but at runtime they contain INodeInputSlot/INodeOutputSlot objects
|
||||
!!nodeData.inputs?.some(
|
||||
(slot) => (slot as INodeInputSlot)?.hasErrors ?? false
|
||||
) ||
|
||||
!!nodeData.outputs?.some(
|
||||
(slot) => (slot as INodeOutputSlot)?.hasErrors ?? false
|
||||
)
|
||||
nodeData.inputs?.some((slot) => slot?.hasErrors) ||
|
||||
nodeData.outputs?.some((slot) => slot?.hasErrors)
|
||||
)
|
||||
})
|
||||
|
||||
@@ -279,7 +271,7 @@ const { latestPreviewUrl, shouldShowPreviewImg } = useNodePreviewState(
|
||||
|
||||
const borderClass = computed(() => {
|
||||
if (hasAnyError.value) {
|
||||
return 'border-red-500 dark-theme:border-red-500'
|
||||
return 'border-error dark-theme:border-error'
|
||||
}
|
||||
if (executing.value) {
|
||||
return 'border-blue-500'
|
||||
@@ -292,10 +284,10 @@ const outlineClass = computed(() => {
|
||||
return undefined
|
||||
}
|
||||
if (hasAnyError.value) {
|
||||
return 'outline-red-500'
|
||||
return 'outline-error dark-theme:outline-error'
|
||||
}
|
||||
if (executing.value) {
|
||||
return 'outline-blue-500'
|
||||
return 'outline-blue-500 dark-theme:outline-blue-500'
|
||||
}
|
||||
return 'outline-black dark-theme:outline-white'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user