diff --git a/src/store.js b/src/store.js index 04d8487..c4f7a84 100644 --- a/src/store.js +++ b/src/store.js @@ -1,5 +1,19 @@ import { computed } from "@vue/reactivity"; -import { ref } from "vue"; +import { ref, watch } from "vue"; + +export const substitutionFilter = ref( + localStorage.getItem("substitutionFilter") || "all" +); +export const timetableClass = ref( + localStorage.getItem("timetableClass") || "none" +); + +watch(substitutionFilter, (newValue) => { + localStorage.setItem("substitutionFilter", newValue); +}); +watch(timetableClass, (newValue) => { + localStorage.setItem("timetableClass", newValue); +}); export const history = ref([]); diff --git a/src/views/SettingsView.vue b/src/views/SettingsView.vue index e69de29..f9a817c 100644 --- a/src/views/SettingsView.vue +++ b/src/views/SettingsView.vue @@ -0,0 +1,62 @@ + + + + +