Add theme switching!!!! #18

Merged
twig merged 9 commits from settings-appearance into main 2025-07-05 17:29:46 +00:00
Showing only changes of commit 2c4489917a - Show all commits

View file

@ -60,14 +60,11 @@ function changeTheme(id: string, url: string) {
const fetchThemes = async () => { const fetchThemes = async () => {
for (const theme of defaultThemes) { for (const theme of defaultThemes) {
const themeConfig = await fetch(`${baseURL}themes/${theme}.json`) const themeConfig = await $fetch(`${baseURL}themes/${theme}.json`) as Theme
const themeConfigJson = await themeConfig.json() as Theme themeConfig.id = theme
themeConfigJson.id = theme
themes.push(themeConfigJson) themes.push(themeConfig)
} }
console.log(themes)
} }
await fetchThemes() await fetchThemes()