store asset content type in db, add video support

Signed-off-by: Nicolas Froger <nicolas@kektus.xyz>
This commit is contained in:
Nicolas Froger 2024-07-27 02:47:56 +02:00
commit 25b6dbcd7e
No known key found for this signature in database
13 changed files with 56 additions and 26 deletions

View file

@ -62,7 +62,18 @@ function postDataToggle() {
<img
class="absolute top-0 left-0 w-full h-full object-cover -z-10"
:data-src="asset.presignedUrl"
v-if="asset.contentType.startsWith('image/')"
/>
<video
class="absolute top-0 left-0 w-full h-full object-cover -z-10"
loop
muted="true"
playsinline
data-autoplay
v-else
>
<source :src="asset.presignedUrl" :type="asset.contentType" />
</video>
<div
class="grid grid-cols-3 grid-rows-5 absolute w-full h-full top-0 left-0 pointer-events-none"
>