web/settings/local: hide the webcodecs toggle if the feature not enabled

This commit is contained in:
wukko 2025-03-05 20:36:09 +06:00
parent a3c9ccf5df
commit e61ac61e20
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -1,4 +1,5 @@
<script lang="ts">
import env from "$lib/env";
import { t } from "$lib/i18n/translations";
import SettingsToggle from "$components/buttons/SettingsToggle.svelte";
@ -14,11 +15,13 @@
/>
</SettingsCategory>
<SettingsCategory sectionId="webcodecs" title={$t("settings.local.webcodecs")} beta>
<SettingsToggle
settingContext="advanced"
settingId="useWebCodecs"
title={$t("settings.local.webcodecs.title")}
description={$t("settings.local.webcodecs.description")}
/>
</SettingsCategory>
{#if env.ENABLE_WEBCODECS}
<SettingsCategory sectionId="webcodecs" title={$t("settings.local.webcodecs")} beta>
<SettingsToggle
settingContext="advanced"
settingId="useWebCodecs"
title={$t("settings.local.webcodecs.title")}
description={$t("settings.local.webcodecs.description")}
/>
</SettingsCategory>
{/if}