Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/renderer/extensions/vueNodes/components/InputSlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
cn(
'lg-slot lg-slot--input flex items-center group rounded-r-lg m-0',
'cursor-crosshair',
props.dotOnly ? 'lg-slot--dot-only' : 'pr-6',
dotOnly ? 'lg-slot--dot-only' : 'pr-6',
{
'lg-slot--connected': props.connected,
'lg-slot--compatible': props.compatible,
Expand Down Expand Up @@ -36,7 +36,7 @@
<!-- Slot Name -->
<div class="h-full flex items-center min-w-0">
<span
v-if="!dotOnly"
v-if="!props.dotOnly && !hasNoLabel"
:class="
cn(
'truncate text-node-component-slot-text',
Expand All @@ -47,8 +47,7 @@
{{
slotData.label ||
slotData.localized_name ||
slotData.name ||
`Input ${index}`
(slotData.name ?? `Input ${index}`)
}}
</span>
</div>
Expand Down Expand Up @@ -84,6 +83,14 @@ interface InputSlotProps {

const props = defineProps<InputSlotProps>()

const hasNoLabel = computed(
() =>
!props.slotData.label &&
!props.slotData.localized_name &&
props.slotData.name === ''
)
const dotOnly = computed(() => props.dotOnly || hasNoLabel.value)

const executionStore = useExecutionStore()

const hasSlotError = computed(() => {
Expand Down
14 changes: 11 additions & 3 deletions src/renderer/extensions/vueNodes/components/OutputSlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
<div v-else v-tooltip.right="tooltipConfig" :class="slotWrapperClass">
<div class="relative h-full flex items-center min-w-0">
<!-- Slot Name -->
<span v-if="!dotOnly" class="truncate text-node-component-slot-text">
{{ slotData.localized_name || slotData.name || `Output ${index}` }}
<span
v-if="!props.dotOnly && !hasNoLabel"
class="truncate text-node-component-slot-text"
>
{{ slotData.localized_name || (slotData.name ?? `Output ${index}`) }}
</span>
</div>
<!-- Connection Dot -->
Expand Down Expand Up @@ -44,6 +47,11 @@ interface OutputSlotProps {

const props = defineProps<OutputSlotProps>()

const hasNoLabel = computed(
() => !props.slotData.localized_name && props.slotData.name === ''
)
const dotOnly = computed(() => props.dotOnly || hasNoLabel.value)

// Error boundary implementation
const renderError = ref<string | null>(null)

Expand Down Expand Up @@ -79,7 +87,7 @@ const slotWrapperClass = computed(() =>
cn(
'lg-slot lg-slot--output flex items-center justify-end group rounded-l-lg h-6',
'cursor-crosshair',
props.dotOnly ? 'lg-slot--dot-only justify-center' : 'pl-6',
dotOnly.value ? 'lg-slot--dot-only justify-center' : 'pl-6',
{
'lg-slot--connected': props.connected,
'lg-slot--compatible': props.compatible,
Expand Down