diff --git a/components/Settings/AppSettings/Appearance.vue b/components/Settings/AppSettings/Appearance.vue index 82e3845..0f7b504 100644 --- a/components/Settings/AppSettings/Appearance.vue +++ b/components/Settings/AppSettings/Appearance.vue @@ -8,7 +8,7 @@ {{ theme.displayName }} @@ -34,19 +34,19 @@ let themeLinkElement: HTMLLinkElement | null = null; const themes: Array = [] interface Theme { - id: string + ID: string displayName: string previewGradient: string complementaryColor: string - themeUrl: string + themeURL: string } -function changeTheme(id: string, url: string) { - if (themeLinkElement && themeLinkElement.getAttribute('href') === `${baseURL}themes/${url}`) { +function changeTheme(ID: string, URL: string) { + if (themeLinkElement && themeLinkElement.getAttribute('href') === `${baseURL}themes/${URL}`) { return; } - localStorage.setItem("selectedTheme", id); + localStorage.setItem("selectedTheme", ID); // if the theme didn't originally load for some reason, create it if (!themeLinkElement) { @@ -55,14 +55,14 @@ function changeTheme(id: string, url: string) { document.head.appendChild(themeLinkElement); } - themeLinkElement.href = `${baseURL}themes/${url}`; + themeLinkElement.href = `${baseURL}themes/${URL}`; } const fetchThemes = async () => { for (const theme of defaultThemes) { const themeConfig = await fetch(`${baseURL}themes/${theme}.json`) const themeConfigJson = await themeConfig.json() as Theme - themeConfigJson.id = theme + themeConfigJson.ID = theme themes.push(themeConfigJson) } diff --git a/pages/settings.vue b/pages/settings.vue index 17558b1..01b78d7 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -40,6 +40,9 @@