theme selector fixed

This commit is contained in:
zurdi
2023-08-18 08:56:46 +02:00
parent 2ffde7d9ca
commit bda58621f0

View File

@@ -4,12 +4,13 @@ import { useTheme } from "vuetify";
import { themes } from "@/styles/themes.js";
// Props
const theme = useTheme();
const selectedTheme = ref(localStorage.getItem("theme"));
// Functions
function toggleTheme() {
localStorage.setItem("theme", selectedTheme.value);
useTheme().global.name.value = themes[selectedTheme.value];
theme.global.name.value = themes[selectedTheme.value];
}
</script>
<template>