mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 17:38:31 +00:00
web/PickerItem: enable video thumb mode only when item is a video
This commit is contained in:
parent
5e26c1e122
commit
6e24a8d172
@ -17,10 +17,7 @@
|
|||||||
$: itemType = item.type ?? "photo";
|
$: itemType = item.type ?? "photo";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<button
|
<button class="picker-item" on:click={() => downloadFile(item.url)}>
|
||||||
class="picker-item"
|
|
||||||
on:click={() => downloadFile(item.url)}
|
|
||||||
>
|
|
||||||
<div class="picker-type">
|
<div class="picker-type">
|
||||||
{#if itemType === "video"}
|
{#if itemType === "video"}
|
||||||
<IconMovie />
|
<IconMovie />
|
||||||
@ -34,7 +31,7 @@
|
|||||||
src={item.thumb ?? item.url}
|
src={item.thumb ?? item.url}
|
||||||
|
|
||||||
class:loading={!imageLoaded}
|
class:loading={!imageLoaded}
|
||||||
class:video-thumbnail={item.thumb}
|
class:video-thumbnail={itemType === "video"}
|
||||||
on:load={() => imageLoaded = true}
|
on:load={() => imageLoaded = true}
|
||||||
|
|
||||||
alt="{$t(`a11y.dialog.picker.item.${itemType}`)} {number}"
|
alt="{$t(`a11y.dialog.picker.item.${itemType}`)} {number}"
|
||||||
|
Loading…
Reference in New Issue
Block a user