Spaces:
Sleeping
Sleeping
Download dashboard/features/studio/theme.js from JuanCS-Dev/twitch-byte-bot: direct link, hf CLI and curl.
- Browser
- Download file 577 Bytes
-
https://huggingface.co/spaces/JuanCS-Dev/twitch-byte-bot/resolve/main/dashboard/features/studio/theme.js
- Command line
-
hf download hf://spaces/JuanCS-Dev/twitch-byte-bot/dashboard/features/studio/theme.js
-
curl -L -o theme.js https://huggingface.co/spaces/JuanCS-Dev/twitch-byte-bot/resolve/main/dashboard/features/studio/theme.js
577 Bytes
| // dashboard/features/studio/theme.js | |
| // Pure theme resolution. DOM application lives in main.js (applyTheme). | |
| export const THEMES = ["auto", "light", "dark"]; | |
| export const THEME_LABEL = { auto: "auto", light: "claro", dark: "escuro" }; | |
| /** Normalize a stored value to a valid theme (default auto). */ | |
| export function resolveTheme(stored) { | |
| return THEMES.includes(stored) ? stored : "auto"; | |
| } | |
| /** Cycle auto → light → dark → auto. */ | |
| export function nextTheme(current) { | |
| const i = THEMES.indexOf(resolveTheme(current)); | |
| return THEMES[(i + 1) % THEMES.length]; | |
| } | |