Add profile management

- Save class filter, timetable and timetable groups in profiles
- Easily switch between profiles
- Rename profiles
- Export/Import/Duplicate profiles
This commit is contained in:
2023-08-26 21:54:02 +02:00
parent 70238b4151
commit 21b2e68198
14 changed files with 401 additions and 114 deletions

View File

@ -4,7 +4,7 @@ import {
timetable,
timetables,
localTimetables,
timetableId,
activeProfile,
baseUrl,
fetchTimetables,
} from "@/store";
@ -78,7 +78,7 @@ async function uploadTimetable(id) {
} else {
loadingProgress.value = 0.5;
await fetchTimetables();
timetableId.value = id;
activeProfile.value.timetableId = id;
}
loadingProgress.value = 1;
@ -94,10 +94,10 @@ async function uploadTimetable(id) {
v-for="timetable in localTimetables"
:key="timetable.id"
:timetable="timetable"
:selected="timetableId == timetable.id"
:selected="activeProfile.timetableId == timetable.id"
:editable="true"
:remote="false"
@click="timetableId = timetable.id"
@click="activeProfile.timetableId = timetable.id"
@edit="$router.push('timetable/edit/' + timetable.id)"
@copy="copyTimetable(timetable)"
@delete="
@ -129,10 +129,10 @@ async function uploadTimetable(id) {
v-for="timetable in timetables"
:key="timetable.id"
:timetable="timetable"
:selected="timetableId == timetable.id"
:selected="activeProfile.timetableId == timetable.id"
:editable="canEditTimetable(timetable.id)"
:remote="true"
@click="timetableId = timetable.id"
@click="activeProfile.timetableId = timetable.id"
@copy="copyTimetable(timetable)"
@export="exportTimetable(timetable)"
@upload="uploadTimetable(timetable.id)"