web/PickerItem: enable video thumb mode only when item is a video
This commit is contained in:
parent
5e26c1e122
commit
6e24a8d172
1 changed files with 2 additions and 5 deletions
|
@ -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