Add support for multiple remote timetables

- Add timetable "title" column to db
- Make API return array of timetables
- Add settings page for selecting a timetable
- Add InfoCard if no timetable is selected
This commit is contained in:
2023-06-18 14:30:36 +02:00
parent dac0d09167
commit 48364d4c59
10 changed files with 176 additions and 30 deletions

View File

@ -0,0 +1,33 @@
<script setup>
import TimetableCard from "@/components/settings/timetable-card.vue";
import { timetables, timetableId } from "@/store";
</script>
<template>
<h2>{{ $t("settings.heading.remoteTimetables") }}</h2>
<div class="list">
<TimetableCard
v-for="timetable in timetables"
:key="timetable.id"
:timetable="timetable"
:selected="timetableId == timetable.id"
:editable="true"
@click="timetableId = timetable.id"
/>
</div>
</template>
<style scoped>
h2 {
margin: 5px 0px;
}
p {
margin: 5px 0px;
}
.list {
display: grid;
gap: 8px;
}
</style>