mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
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";
|
$: 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 a new issue