Truncate sidebar title first to avoid tool buttons wrap (#2192)

This commit is contained in:
Chenlei Hu
2025-01-07 15:14:09 -05:00
committed by GitHub
parent 0130d41be5
commit c437d32691

View File

@@ -4,11 +4,11 @@
:class="props.class" :class="props.class"
> >
<div class="comfy-vue-side-bar-header"> <div class="comfy-vue-side-bar-header">
<Toolbar <Toolbar class="border-x-0 border-t-0 rounded-none px-2 py-1 min-h-8">
class="flex-shrink-0 border-x-0 border-t-0 rounded-none px-2 py-1 min-h-8"
>
<template #start> <template #start>
<span class="text-sm">{{ props.title.toUpperCase() }}</span> <span class="text-xs 2xl:text-sm truncate" :title="props.title">
{{ props.title.toUpperCase() }}
</span>
</template> </template>
<template #end> <template #end>
<slot name="tool-buttons"></slot> <slot name="tool-buttons"></slot>
@@ -37,4 +37,8 @@ const props = defineProps<{
:deep(.p-toolbar-end) .p-button { :deep(.p-toolbar-end) .p-button {
@apply py-1 2xl:py-2; @apply py-1 2xl:py-2;
} }
:deep(.p-toolbar-start) {
@apply min-w-0 flex-1 overflow-hidden;
}
</style> </style>