mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +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))"
|
:class="getAssetCardClass(isSelected(item.asset.id))"
|
||||||
:preview-url="item.asset.preview_url"
|
:preview-url="item.asset.preview_url ?? undefined"
|
||||||
:preview-alt="item.asset.name"
|
:preview-alt="item.asset.name"
|
||||||
:icon-name="
|
:icon-name="
|
||||||
iconForMediaType(getMediaTypeFromFilename(item.asset.name))
|
iconForMediaType(getMediaTypeFromFilename(item.asset.name))
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
v-else
|
v-else
|
||||||
:src="asset.preview_url"
|
:src="asset.preview_url ?? undefined"
|
||||||
:alt="displayName"
|
:alt="displayName"
|
||||||
class="size-full object-cover cursor-pointer"
|
class="size-full object-cover cursor-pointer"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
muted
|
muted
|
||||||
loop
|
loop
|
||||||
playsinline
|
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"
|
class="relative size-full object-contain transition-transform duration-300 group-hover:scale-105 group-data-[selected=true]:scale-105"
|
||||||
@click.stop
|
@click.stop
|
||||||
@play="onVideoPlay"
|
@play="onVideoPlay"
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ const zAsset = z.object({
|
|||||||
size: z.number().optional(), // TBD: Will be provided by history API in the future
|
size: z.number().optional(), // TBD: Will be provided by history API in the future
|
||||||
mime_type: z.string().nullish(),
|
mime_type: z.string().nullish(),
|
||||||
tags: z.array(z.string()).optional().default([]),
|
tags: z.array(z.string()).optional().default([]),
|
||||||
preview_id: z.string().nullable().optional(),
|
preview_id: z.string().nullish(),
|
||||||
preview_url: z.string().optional(),
|
preview_url: z.string().nullish(),
|
||||||
created_at: z.string().optional(),
|
created_at: z.string().optional(),
|
||||||
updated_at: z.string().optional(),
|
updated_at: z.string().optional(),
|
||||||
is_immutable: z.boolean().optional(),
|
is_immutable: z.boolean().optional(),
|
||||||
|
|||||||
Reference in New Issue
Block a user