Files
immich/web/src/lib/components/shared-components/search-bar/search-media-section.svelte
T
2025-09-16 18:31:22 +00:00

35 lines
960 B
Svelte

<script lang="ts">
import { MediaType } from '$lib/constants';
import RadioButton from '$lib/elements/RadioButton.svelte';
import { t } from 'svelte-i18n';
interface Props {
filteredMedia: MediaType;
}
let { filteredMedia = $bindable() }: Props = $props();
</script>
<div id="media-type-selection">
<fieldset>
<legend class="uppercase immich-form-label">{$t('media_type')}</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>