mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
[nit] Add title to show full text in workflow template dialog (#3058)
This commit is contained in:
@@ -54,11 +54,15 @@
|
|||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<h3
|
<h3
|
||||||
class="line-clamp-1 text-lg font-normal text-surface-900 dark:text-surface-100"
|
class="line-clamp-1 text-lg font-normal text-surface-900 dark:text-surface-100"
|
||||||
|
:title="title"
|
||||||
>
|
>
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</h3>
|
</h3>
|
||||||
<p class="line-clamp-2 text-sm text-surface-600 dark:text text-muted">
|
<p
|
||||||
{{ template.description.replace(/[-_]/g, ' ') }}
|
class="line-clamp-2 text-sm text-surface-600 dark:text text-muted"
|
||||||
|
:title="description"
|
||||||
|
>
|
||||||
|
{{ description }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -82,6 +86,7 @@ import AudioThumbnail from '@/components/templates/thumbnails/AudioThumbnail.vue
|
|||||||
import CompareSliderThumbnail from '@/components/templates/thumbnails/CompareSliderThumbnail.vue'
|
import CompareSliderThumbnail from '@/components/templates/thumbnails/CompareSliderThumbnail.vue'
|
||||||
import DefaultThumbnail from '@/components/templates/thumbnails/DefaultThumbnail.vue'
|
import DefaultThumbnail from '@/components/templates/thumbnails/DefaultThumbnail.vue'
|
||||||
import HoverDissolveThumbnail from '@/components/templates/thumbnails/HoverDissolveThumbnail.vue'
|
import HoverDissolveThumbnail from '@/components/templates/thumbnails/HoverDissolveThumbnail.vue'
|
||||||
|
import { st } from '@/i18n'
|
||||||
import { api } from '@/scripts/api'
|
import { api } from '@/scripts/api'
|
||||||
import { TemplateInfo } from '@/types/workflowTemplateTypes'
|
import { TemplateInfo } from '@/types/workflowTemplateTypes'
|
||||||
import { normalizeI18nKey } from '@/utils/formatUtil'
|
import { normalizeI18nKey } from '@/utils/formatUtil'
|
||||||
@@ -122,12 +127,15 @@ const overlayThumbnailSrc = computed(() =>
|
|||||||
|
|
||||||
const title = computed(() => {
|
const title = computed(() => {
|
||||||
return sourceModule === 'default'
|
return sourceModule === 'default'
|
||||||
? t(
|
? st(
|
||||||
`templateWorkflows.template.${normalizeI18nKey(categoryTitle)}.${normalizeI18nKey(template.name)}`
|
`templateWorkflows.template.${normalizeI18nKey(categoryTitle)}.${normalizeI18nKey(template.name)}`,
|
||||||
|
template.name
|
||||||
)
|
)
|
||||||
: template.name ?? `${sourceModule} Template`
|
: template.name ?? `${sourceModule} Template`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const description = computed(() => template.description.replace(/[-_]/g, ' '))
|
||||||
|
|
||||||
defineEmits<{
|
defineEmits<{
|
||||||
loadWorkflow: [name: string]
|
loadWorkflow: [name: string]
|
||||||
}>()
|
}>()
|
||||||
|
|||||||
Reference in New Issue
Block a user