✨ Add settings page
This commit is contained in:
16
src/store.js
16
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([]);
|
||||
|
||||
|
Reference in New Issue
Block a user