mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 06:44:32 +00:00
Allow for null depending on how the backend sends assets.
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
})
|
||||
"
|
||||
:class="getAssetCardClass(isSelected(item.asset.id))"
|
||||
:preview-url="item.asset.preview_url"
|
||||
:preview-url="item.asset.preview_url ?? undefined"
|
||||
:preview-alt="item.asset.name"
|
||||
:icon-name="
|
||||
iconForMediaType(getMediaTypeFromFilename(item.asset.name))
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/>
|
||||
<img
|
||||
v-else
|
||||
:src="asset.preview_url"
|
||||
:src="asset.preview_url ?? undefined"
|
||||
:alt="displayName"
|
||||
class="size-full object-cover cursor-pointer"
|
||||
/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
muted
|
||||
loop
|
||||
playsinline
|
||||
:poster="asset.preview_url"
|
||||
:poster="asset.preview_url ?? undefined"
|
||||
class="relative size-full object-contain transition-transform duration-300 group-hover:scale-105 group-data-[selected=true]:scale-105"
|
||||
@click.stop
|
||||
@play="onVideoPlay"
|
||||
|
||||
@@ -8,8 +8,8 @@ const zAsset = z.object({
|
||||
size: z.number().optional(), // TBD: Will be provided by history API in the future
|
||||
mime_type: z.string().nullish(),
|
||||
tags: z.array(z.string()).optional().default([]),
|
||||
preview_id: z.string().nullable().optional(),
|
||||
preview_url: z.string().optional(),
|
||||
preview_id: z.string().nullish(),
|
||||
preview_url: z.string().nullish(),
|
||||
created_at: z.string().optional(),
|
||||
updated_at: z.string().optional(),
|
||||
is_immutable: z.boolean().optional(),
|
||||
|
||||
Reference in New Issue
Block a user