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