refactor: load and save settings from a single object
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful

This commit is contained in:
Twig 2025-07-11 23:48:03 +02:00
parent cd1f294600
commit 5b4c278b83
No known key found for this signature in database
4 changed files with 49 additions and 13 deletions

View file

@ -26,6 +26,8 @@
</template>
<script lang="ts" setup>
import settingSave from '~/utils/settingSave';
const runtimeConfig = useRuntimeConfig()
const defaultThemes = runtimeConfig.public.defaultThemes
const baseURL = runtimeConfig.app.baseURL;
@ -46,7 +48,7 @@ function changeTheme(id: string, url: string) {
return;
}
localStorage.setItem("selectedTheme", id);
settingSave("selectedThemeUrl", id)
// if the theme didn't originally load for some reason, create it
if (!themeLinkElement) {