best way to save what you love
Svelte collaborationdownloaderinstagramjavascriptmusicredditsocial-mediasoundcloudsveltetiktoktwittertypescriptvideovimeovkwebappyoutubeyoutube-downloader
web/settings/local: transform the media processing setting to a switcher
wukko885398955ffc
diff --git a/web/i18n/en/settings.json b/web/i18n/en/settings.jsonindex 458e8e6c..dac6b62a 100644--- a/web/i18n/en/settings.json+++ b/web/i18n/en/settings.json@@ -143,9 +143,11 @@"advanced.settings_data": "settings data","advanced.local_storage": "local storage",- "local.saving": "media processing",- "local.saving.title": "download & process media locally",- "local.saving.description": "when downloading media, remuxing and transcoding will be done on-device instead of the cloud. you'll see detailed progress in the processing queue. processing instances may enforce this feature to save resources.\n\nexclusive on-device features are not affected by this toggle, they always run locally.",+ "local.saving": "local media processing",+ "local.saving.description": "when downloading media, remuxing and transcoding will be done on-device instead of the cloud. you'll see detailed progress in the processing queue.\n\ndisabled: local processing will not be used. processing instances can enforce local processing, so this option may not have effect.\npreferred: media that requires extra processing will be downloaded through the processing queue, but the rest of media will be downloaded by your browser's download manager.\nforced: all media will always be proxied and downloaded through the processing queue.\n\nexclusive on-device features are not affected by this setting, they always run locally.",+ "local.saving.disabled": "disabled",+ "local.saving.preferred": "preferred",+ "local.saving.forced": "forced","local.webcodecs": "webcodecs","local.webcodecs.title": "use webcodecs for on-device processing",diff --git a/web/src/routes/settings/local/+page.svelte b/web/src/routes/settings/local/+page.svelteindex babff20e..656e7fa3 100644--- a/web/src/routes/settings/local/+page.svelte+++ b/web/src/routes/settings/local/+page.svelte@@ -1,18 +1,26 @@<script lang="ts">import env from "$lib/env";import { t } from "$lib/i18n/translations";+ import { localProcessingOptions } from "$lib/types/settings";+ import Switcher from "$components/buttons/Switcher.svelte";+ import SettingsButton from "$components/buttons/SettingsButton.svelte";import SettingsToggle from "$components/buttons/SettingsToggle.svelte";import SettingsCategory from "$components/settings/SettingsCategory.svelte";</script><SettingsCategory sectionId="media-processing" title={$t("settings.local.saving")} beta>- <SettingsToggle- settingContext="save"- settingId="localProcessing"- title={$t("settings.local.saving.title")}- description={$t("settings.local.saving.description")}- />+ <Switcher big={true} description={$t("settings.local.saving.description")}>+ {#each localProcessingOptions as value}+ <SettingsButton+ settingContext="save"+ settingId="localProcessing"+ settingValue={value}+ >+ {$t(`settings.local.saving.${value}`)}+ </SettingsButton>+ {/each}+ </Switcher></SettingsCategory>{#if env.ENABLE_WEBCODECS}