feat(web): disable searching by disabled features (#23798)

fix(web): disable searching by disabled features
This commit is contained in:
Mees Frensel 2025-11-12 16:19:18 +01:00 committed by GitHub
parent c958f9856d
commit edf21bae41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,6 @@
<script lang="ts">
import RadioButton from '$lib/elements/RadioButton.svelte';
import { featureFlags } from '$lib/stores/server-config.store';
import { t } from 'svelte-i18n';
interface Props {
@ -13,7 +14,9 @@
<fieldset>
<legend class="immich-form-label">{$t('search_type')}</legend>
<div class="flex flex-wrap gap-x-5 gap-y-2 mt-1 mb-2">
{#if $featureFlags.loaded && $featureFlags.smartSearch}
<RadioButton name="query-type" id="context-radio" label={$t('context')} bind:group={queryType} value="smart" />
{/if}
<RadioButton
name="query-type"
id="file-name-radio"
@ -28,7 +31,9 @@
bind:group={queryType}
value="description"
/>
{#if $featureFlags.loaded && $featureFlags.ocr}
<RadioButton name="query-type" id="ocr-radio" label={$t('ocr')} bind:group={queryType} value="ocr" />
{/if}
</div>
</fieldset>