[backport cloud/1.36] fix(UploadModel): truncate long filenames in wizard (#7944)

Backport of #7939 to `cloud/1.36`

Automatically created by backport workflow.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7944-backport-cloud-1-36-fix-UploadModel-truncate-long-filenames-in-wizard-2e46d73d365081518cf3f78545ca5ecd)
by [Unito](https://www.unito.io)

Co-authored-by: Alexander Brown <drjkl@comfy.org>
This commit is contained in:
Comfy Org PR Bot
2026-01-11 03:52:18 +09:00
committed by GitHub
parent 348d674455
commit e84b6f3696
2 changed files with 17 additions and 14 deletions

View File

@@ -5,15 +5,15 @@
{{ $t('assetBrowser.modelAssociatedWithLink') }}
</p>
<div
class="flex items-center gap-3 bg-secondary-background p-3 rounded-lg"
class="flex items-center gap-3 rounded-lg bg-secondary-background p-3"
>
<img
v-if="previewImage"
:src="previewImage"
:alt="metadata?.filename || metadata?.name || 'Model preview'"
class="w-14 h-14 rounded object-cover flex-shrink-0"
class="size-14 flex-shrink-0 rounded object-cover"
/>
<p class="m-0 text-base-foreground">
<p class="m-0 min-w-0 flex-1 truncate text-base-foreground">
{{ metadata?.filename || metadata?.name }}
</p>
</div>

View File

@@ -10,19 +10,21 @@
</p>
<div
class="flex flex-row items-center gap-3 p-4 bg-modal-card-background rounded-lg"
class="flex flex-row items-center gap-3 rounded-lg bg-modal-card-background p-4"
>
<img
v-if="previewImage"
:src="previewImage"
:alt="metadata?.filename || metadata?.name || 'Model preview'"
class="w-14 h-14 rounded object-cover flex-shrink-0"
class="size-14 flex-shrink-0 rounded object-cover"
/>
<div class="flex flex-col justify-center items-start gap-1 flex-1">
<p class="text-base-foreground m-0">
<div
class="flex min-w-0 flex-1 flex-col items-start justify-center gap-1"
>
<p class="m-0 w-full truncate text-base-foreground">
{{ metadata?.filename || metadata?.name }}
</p>
<p class="text-sm text-muted m-0">
<p class="m-0 text-sm text-muted">
{{ modelType }}
</p>
</div>
@@ -39,20 +41,21 @@
</p>
<div
class="flex flex-row items-center gap-3 p-4 bg-modal-card-background rounded-lg"
class="flex flex-row items-center gap-3 rounded-lg bg-modal-card-background p-4"
>
<img
v-if="previewImage"
:src="previewImage"
:alt="metadata?.filename || metadata?.name || 'Model preview'"
class="w-14 h-14 rounded object-cover flex-shrink-0"
class="size-14 flex-shrink-0 rounded object-cover"
/>
<div class="flex flex-col justify-center items-start gap-1 flex-1">
<p class="text-base-foreground m-0">
<div
class="flex min-w-0 flex-1 flex-col items-start justify-center gap-1"
>
<p class="m-0 w-full truncate text-base-foreground">
{{ metadata?.filename || metadata?.name }}
</p>
<p class="text-sm text-muted m-0">
<!-- Going to want to add another translation here to get a nice display name. -->
<p class="m-0 text-sm text-muted">
{{ modelType }}
</p>
</div>