Fix library thumbnails and let clips keep a display name.
Extract a poster frame when a still-thumb is missing, and show the clip name in the library with the prompt on the info icon. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -66,9 +66,17 @@
|
||||
class="overflow-hidden rounded-2xl border border-white/10 bg-zinc-950 text-left hover:border-amber-300/50"
|
||||
@click="pickClip(clip)"
|
||||
>
|
||||
<img :src="`/api/library/clips/${clip.id}/thumb`" alt="" class="h-28 w-full object-cover">
|
||||
<img v-if="clip.hasThumbnail" :src="`/api/library/clips/${clip.id}/thumb`" alt="" class="h-28 w-full object-cover">
|
||||
<video
|
||||
v-else
|
||||
:src="`/api/library/clips/${clip.id}/video#t=0.1`"
|
||||
class="h-28 w-full object-cover"
|
||||
muted
|
||||
playsinline
|
||||
preload="metadata"
|
||||
/>
|
||||
<div class="px-3 py-2">
|
||||
<span class="truncate text-xs text-zinc-400">From a clip</span>
|
||||
<span class="truncate text-xs text-zinc-400">{{ clip.name || 'From a clip' }}</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
@@ -100,6 +108,8 @@ export interface PickerClip {
|
||||
id: string
|
||||
folderId: string
|
||||
hideThumbnail: boolean
|
||||
hasThumbnail?: boolean
|
||||
name?: string
|
||||
prompt: string
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user