[events] Fixed AgendaView mobile layout in portrait mode

This commit is contained in:
Ferdinand Thiessen 2021-04-01 19:38:38 +02:00
parent 48aa6c724a
commit 3530132e72
1 changed files with 5 additions and 3 deletions

View File

@ -46,7 +46,7 @@
<q-btn <q-btn
flat flat
dense dense
:label="calendarView == 'day' ? 'Heute' : 'Diese Woche'" :label="calendarDays == 1 ? 'Heute' : 'Diese Woche'"
@click="calendarNow" @click="calendarNow"
/> />
<q-separator vertical /> <q-separator vertical />
@ -55,6 +55,7 @@
<!-- <q-space /> --> <!-- <q-space /> -->
<q-btn-toggle <q-btn-toggle
v-if="windowWidth >= 600"
v-model="calendarView" v-model="calendarView"
class="row absolute-right" class="row absolute-right"
flat flat
@ -133,8 +134,8 @@ export default defineComponent({
const calendarRealView = computed(() => (calendarDays.value != 7 ? 'day' : 'week')); const calendarRealView = computed(() => (calendarDays.value != 7 ? 'day' : 'week'));
const calendarDays = computed(() => const calendarDays = computed(() =>
// <= 1023 is the breakpoint for md // 599px is breakpoint for xs, 1439px is the breakpoint for md
calendarView.value == 'day' ? 1 : windowWidth.value <= 1439 ? 3 : 7 calendarView.value == 'day' || windowWidth.value < 600 ? 1 : windowWidth.value <= 1440 ? 3 : 7
); );
const events = ref<Agendas>({}); const events = ref<Agendas>({});
const editor = ref<EditableEvent | undefined>(undefined); const editor = ref<EditableEvent | undefined>(undefined);
@ -285,6 +286,7 @@ export default defineComponent({
selectedDate, selectedDate,
showDay, showDay,
updateProxy, updateProxy,
windowWidth,
}; };
}, },
}); });