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

@ -2,7 +2,7 @@
import TimetableSetup from "@/components/timetable-setup.vue";
import {
classList,
classFilter,
activeProfile,
timetable,
loadingFailed,
loading,
@ -15,13 +15,15 @@ import { ClockIcon, CloudOffIcon, CalendarOffIcon } from "lucide-vue-next";
<template>
<TimetableSetup
v-show="classFilter == 'none'"
v-show="activeProfile.classFilter == 'none'"
:options="classList"
v-model="classFilter"
v-model="activeProfile.classFilter"
/>
<div
class="cardContainer"
v-show="(timetable.data || []).length == 0 && classFilter != 'none'"
v-show="
(timetable.data || []).length == 0 && activeProfile.classFilter != 'none'
"
>
<InfoCard
class="card"
@ -45,7 +47,10 @@ import { ClockIcon, CloudOffIcon, CalendarOffIcon } from "lucide-vue-next";
:text="$t('infoCard.texts.loadingFailed')"
/>
</div>
<DayCarousel v-show="classFilter != 'none'" :element="TimetableList" />
<DayCarousel
v-show="activeProfile.classFilter != 'none'"
:element="TimetableList"
/>
</template>
<style scoped>