mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-29 11:06:10 +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";
|
||||
</script>
|
||||
|
||||
<button
|
||||
class="picker-item"
|
||||
on:click={() => downloadFile(item.url)}
|
||||
>
|
||||
<button class="picker-item" on:click={() => downloadFile(item.url)}>
|
||||
<div class="picker-type">
|
||||
{#if itemType === "video"}
|
||||
<IconMovie />
|
||||
|
@ -34,7 +31,7 @@
|
|||
src={item.thumb ?? item.url}
|
||||
|
||||
class:loading={!imageLoaded}
|
||||
class:video-thumbnail={item.thumb}
|
||||
class:video-thumbnail={itemType === "video"}
|
||||
on:load={() => imageLoaded = true}
|
||||
|
||||
alt="{$t(`a11y.dialog.picker.item.${itemType}`)} {number}"
|
||||
|
|
Loading…
Reference in a new issue