immich/web/src/lib/components/shared-components/search-bar/search-media-section.svelte
Alex d1085e8a02
chore(web): move enum out of .svelte file (#14144)
* chore(web): clean up todo task

* chore(web): move enums out of .svelte file
2024-11-14 15:41:11 +00:00

34 lines
976 B
Svelte

<script lang="ts">
import RadioButton from '$lib/components/elements/radio-button.svelte';
import { MediaType } from '$lib/constants';
import { t } from 'svelte-i18n';
interface Props {
filteredMedia: MediaType;
}
let { filteredMedia = $bindable() }: Props = $props();
</script>
<div id="media-type-selection">
<fieldset>
<legend class="immich-form-label">{$t('media_type').toUpperCase()}</legend>
<div class="flex flex-wrap gap-x-5 gap-y-2 mt-1">
<RadioButton name="media-type" id="type-all" bind:group={filteredMedia} label={$t('all')} value={MediaType.All} />
<RadioButton
name="media-type"
id="type-image"
bind:group={filteredMedia}
label={$t('image')}
value={MediaType.Image}
/>
<RadioButton
name="media-type"
id="type-video"
bind:group={filteredMedia}
label={$t('video')}
value={MediaType.Video}
/>
</div>
</fieldset>
</div>