web: settings ui & const for settings type options
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
type CobaltSettingsAccessibility = {
|
||||
export type CobaltSettingsAccessibility = {
|
||||
reduceAnimations: boolean,
|
||||
reduceTransparency: boolean,
|
||||
};
|
||||
|
||||
export const themeOptions = ["auto", "light", "dark"] as const;
|
||||
export const audioFormatOptions = ["best", "mp3", "ogg", "wav", "opus"] as const;
|
||||
export const downloadModeOptions = ["auto", "audio", "mute"] as const;
|
||||
export const filenameStyleOptions = ["classic", "basic", "pretty", "nerdy"] as const;
|
||||
export const videoQualityOptions = ["max", "2160", "1440", "1080", "720", "480", "360", "240", "144"] as const;
|
||||
export const youtubeVideoCodecOptions = ["h264", "av1", "vp9"] as const;
|
||||
|
||||
type CobaltSettingsAppearance = {
|
||||
theme: "auto" | "light" | "dark",
|
||||
theme: typeof themeOptions[number],
|
||||
};
|
||||
|
||||
type CobaltSettingsGeneral = {
|
||||
@@ -14,16 +21,16 @@ type CobaltSettingsGeneral = {
|
||||
};
|
||||
|
||||
type CobaltSettingsSave = {
|
||||
audioFormat: "best" | "mp3" | "ogg" | "wav" | "opus",
|
||||
audioFormat: typeof audioFormatOptions[number],
|
||||
disableMetadata: boolean,
|
||||
downloadMode: "auto" | "audio" | "mute",
|
||||
downloadMode: typeof downloadModeOptions[number],
|
||||
downloadPopup: boolean,
|
||||
filenameStyle: "classic" | "basic" | "pretty" | "nerdy",
|
||||
filenameStyle: typeof filenameStyleOptions[number],
|
||||
tiktokH265: boolean,
|
||||
tiktokFullAudio: boolean,
|
||||
twitterGif: boolean,
|
||||
videoQuality: "max" | "2160" | "1440" | "1080" | "720" | "480" | "360" | "240" | "144",
|
||||
youtubeVideoCodec: "h264" | "av1" | "vp9",
|
||||
videoQuality: typeof videoQualityOptions[number],
|
||||
youtubeVideoCodec: typeof youtubeVideoCodecOptions[number],
|
||||
youtubeDubBrowserLang: boolean,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user