Add theme support

This commit is contained in:
2022-10-03 12:05:44 +02:00
parent 394d86a13a
commit 257f665ce6
7 changed files with 120 additions and 33 deletions

View File

@ -11,6 +11,7 @@ export const timetableGroups = ref(
JSON.parse(localStorage.getItem("timetableGroups") || "[]")
);
export const language = ref(localStorage.getItem("lang") || "en");
export const theme = ref(localStorage.getItem("theme") || "auto");
watch(classFilter, (newValue) => {
localStorage.setItem("classFilter", newValue);
@ -24,6 +25,9 @@ watch(language, (newValue) => {
localStorage.setItem("lang", newValue);
location.reload();
});
watch(theme, (newValue) => {
localStorage.setItem("theme", newValue);
});
// Set this to a positive or negative integer
// to change selectedDate by this number