Files
cobalt/web/src/routes/settings/save/video/+page.svelte
wukko 5c1c401470 web/settings: replace checkbox with toggle
- equal font size & padding for all subtexts in settings
- equal padding & border radius for all settings components

it just looks way better now
2024-06-29 22:51:24 +06:00

59 lines
1.9 KiB
Svelte
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script lang="ts">
import SettingsCategory from "$components/settings/SettingsCategory.svelte";
import Switcher from "$components/buttons/Switcher.svelte";
import SettingsButton from "$components/buttons/SettingsButton.svelte";
import SettingsToggle from "$components/buttons/SettingsToggle.svelte";
import { videoQualityOptions } from "$lib/types/settings";
import { youtubeVideoCodecOptions } from "$lib/types/settings";
const videoDescription = `if preferred quality isnt available, closest one is picked instead.`;
const codecDescription = `if preferred codec isnt available, next best is picked instead.`;
</script>
<SettingsCategory
title="preferred video quality"
description="{videoDescription}"
>
<Switcher big={true}>
{#each videoQualityOptions as value}
<SettingsButton settingContext="save" settingId="videoQuality" settingValue={value}>
{value}
</SettingsButton>
{/each}
</Switcher>
</SettingsCategory>
<SettingsCategory
title="preferred youtube codec"
description="{codecDescription}"
>
<Switcher big={true}>
{#each youtubeVideoCodecOptions as value}
<SettingsButton settingContext="save" settingId="youtubeVideoCodec" settingValue={value}>
{value}
</SettingsButton>
{/each}
</Switcher>
</SettingsCategory>
<SettingsCategory title="twitter">
<SettingsToggle
settingContext="save"
settingId="twitterGif"
title="convert looping videos to GIF"
description="GIF conversion is very lossy, end result may be low quality."
/>
</SettingsCategory>
<SettingsCategory title="tiktok">
<SettingsToggle
settingContext="save"
settingId="tiktokH265"
title="prefer HEVC/H265 format"
description="allows 1080p video downloading at cost of compatibility."
/>
</SettingsCategory>