diff --git a/web/i18n/en/a11y/dialog.json b/web/i18n/en/a11y/dialog.json index cdade377..84df736b 100644 --- a/web/i18n/en/a11y/dialog.json +++ b/web/i18n/en/a11y/dialog.json @@ -1,4 +1,5 @@ { "picker.item.photo": "photo thumbnail", - "picker.item.video": "video thumbnail" + "picker.item.video": "video thumbnail", + "picker.item.gif": "gif thumbnail" } diff --git a/web/src/components/dialog/PickerItem.svelte b/web/src/components/dialog/PickerItem.svelte index fa159981..f5071885 100644 --- a/web/src/components/dialog/PickerItem.svelte +++ b/web/src/components/dialog/PickerItem.svelte @@ -8,6 +8,7 @@ import IconMovie from "@tabler/icons-svelte/IconMovie.svelte"; import IconPhoto from "@tabler/icons-svelte/IconPhoto.svelte"; + import IconGif from "@tabler/icons-svelte/IconGif.svelte"; export let item: DialogPickerItem; export let number: number; @@ -21,6 +22,8 @@
{#if itemType === "video"} + {:else if itemType === "gif"} + {:else} {/if} @@ -31,7 +34,7 @@ src={item.thumb ?? item.url} class:loading={!imageLoaded} - class:video-thumbnail={itemType === "video"} + class:video-thumbnail={["video", "gif"].includes(itemType)} on:load={() => imageLoaded = true} alt="{$t(`a11y.dialog.picker.item.${itemType}`)} {number}" diff --git a/web/src/lib/types/dialog.ts b/web/src/lib/types/dialog.ts index 2e61946d..f01af5e4 100644 --- a/web/src/lib/types/dialog.ts +++ b/web/src/lib/types/dialog.ts @@ -10,7 +10,7 @@ export type DialogButton = { export type SmallDialogIcons = "warn-red"; export type DialogPickerItem = { - type?: 'photo' | 'video', + type?: 'photo' | 'video' | 'gif', url: string, thumb?: string, }