mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-03 12:10:11 +00:00
fix Vue node border styles in different states (executing, error, selected) (#6018)
- Use exact tokens from Figma - Fix issue in which node is stuck in `executing` state after it errors ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6018-fix-Vue-node-border-styles-in-different-states-executing-error-selected-2896d73d365081f39000fc3e42811f0d) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -319,10 +319,9 @@ const { latestPreviewUrl, shouldShowPreviewImg } = useNodePreviewState(
|
||||
)
|
||||
|
||||
const borderClass = computed(() => {
|
||||
return (
|
||||
(hasAnyError.value && 'border-error') ||
|
||||
(executing.value && 'border-node-executing')
|
||||
)
|
||||
if (hasAnyError.value) return 'border-node-stroke-error'
|
||||
if (executing.value) return 'border-node-stroke-executing'
|
||||
return 'border-node-stroke'
|
||||
})
|
||||
|
||||
const outlineClass = computed(() => {
|
||||
|
||||
@@ -17,14 +17,17 @@ export const useNodeExecutionState = (
|
||||
nodeLocatorIdMaybe: MaybeRefOrGetter<string | undefined>
|
||||
) => {
|
||||
const locatorId = computed(() => toValue(nodeLocatorIdMaybe) ?? '')
|
||||
const { nodeLocationProgressStates } = storeToRefs(useExecutionStore())
|
||||
const { nodeLocationProgressStates, isIdle } =
|
||||
storeToRefs(useExecutionStore())
|
||||
|
||||
const progressState = computed(() => {
|
||||
const id = locatorId.value
|
||||
return id ? nodeLocationProgressStates.value[id] : undefined
|
||||
})
|
||||
|
||||
const executing = computed(() => progressState.value?.state === 'running')
|
||||
const executing = computed(
|
||||
() => !isIdle.value && progressState.value?.state === 'running'
|
||||
)
|
||||
|
||||
const progress = computed(() => {
|
||||
const state = progressState.value
|
||||
|
||||
Reference in New Issue
Block a user