Fixed later weeks not being accessable on smaller desktop screens
This commit is contained in:
@@ -11,6 +11,7 @@ import { useRouter, useRoute } from 'vue-router'
|
||||
import { useCalendarEvents } from '@/composables/useCalendarEvents'
|
||||
import { useCalendarNavigation } from '@/composables/useCalendarNavigation'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import { CalendarOptions } from '@fullcalendar/core'
|
||||
|
||||
const monthLabels = [
|
||||
'January', 'February', 'March', 'April', 'May', 'June',
|
||||
@@ -53,11 +54,12 @@ function onDateClick(arg: { dateStr: string }) {
|
||||
dialogRef.value?.openDialog(arg.dateStr);
|
||||
}
|
||||
|
||||
const calendarOptions = ref({
|
||||
const calendarOptions = ref<CalendarOptions>({
|
||||
plugins: [dayGridPlugin, interactionPlugin],
|
||||
initialView: 'dayGridMonth',
|
||||
height: '100%',
|
||||
height: 'auto',
|
||||
expandRows: true,
|
||||
dayMaxEvents: 3,
|
||||
headerToolbar: {
|
||||
left: '',
|
||||
center: '',
|
||||
@@ -70,6 +72,7 @@ const calendarOptions = ref({
|
||||
eventClick: onEventClick,
|
||||
editable: false,
|
||||
|
||||
|
||||
// force block-mode in dayGrid so we can lay it out on one line
|
||||
eventDisplay: 'block',
|
||||
|
||||
@@ -156,7 +159,7 @@ onMounted(() => {
|
||||
<CreateCalendarEvent ref="dialogRef" @reload="loadEvents(); eventViewRef.forceReload();"></CreateCalendarEvent>
|
||||
<div class="flex">
|
||||
<div class="flex-1 min-h-0 mt-5" :class="{ 'hidden md:block': panelOpen }">
|
||||
<div class="h-[80vh] min-h-0">
|
||||
<div class="max-h-[80vh] overflow-y-auto min-h-0 scrollbar-themed p-2">
|
||||
<!-- calendar header -->
|
||||
<div class="flex items-center justify-between mx-5">
|
||||
<!-- Left: title + pickers -->
|
||||
@@ -211,47 +214,46 @@ onMounted(() => {
|
||||
class="w-screen 3xl:w-lg 2xl:w-md lg:border-l bg-card text-foreground flex flex-col overflow-auto scrollbar-themed"
|
||||
:style="{ height: 'calc(100vh - 61px)', position: 'sticky', top: '64px' }">
|
||||
<ViewCalendarEvent ref="eventViewRef" :key="currentEventID" @close="() => { router.push('/calendar'); }"
|
||||
@reload="loadEvents()" @load="calendarRef.getApi().updateSize()" @edit="(val) => { dialogRef.openDialog(null, 'edit', val) }">
|
||||
@reload="loadEvents()" @load="calendarRef.getApi().updateSize()"
|
||||
@edit="(val) => { dialogRef.openDialog(null, 'edit', val) }">
|
||||
</ViewCalendarEvent>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* Firefox */
|
||||
.scrollbar-themed {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #555 #1f1f1f;
|
||||
padding-right: 6px;
|
||||
}
|
||||
|
||||
/* Chrome, Edge, Safari */
|
||||
.scrollbar-themed::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
/* slightly wider to allow padding look */
|
||||
}
|
||||
|
||||
.scrollbar-themed::-webkit-scrollbar-track {
|
||||
background: #1f1f1f;
|
||||
margin-left: 6px;
|
||||
/* ❗ adds space between content + scrollbar */
|
||||
}
|
||||
|
||||
.scrollbar-themed::-webkit-scrollbar-thumb {
|
||||
background: #555;
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
.scrollbar-themed::-webkit-scrollbar-thumb:hover {
|
||||
background: #777;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
/* ---------- Optional container "card" around the calendar ---------- */
|
||||
/* Ensure the calendar fills the container properly */
|
||||
:global(.fc) {
|
||||
height: 100% !important;
|
||||
--fc-border-color: var(--color-border);
|
||||
--fc-button-bg-color: transparent;
|
||||
--fc-button-border-color: var(--color-border);
|
||||
--fc-button-hover-bg-color: var(--color-muted);
|
||||
}
|
||||
|
||||
:global(.fc-theme-standard .fc-scrollgrid) {
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
/* Rounds the corners of the grid */
|
||||
border: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
:global(.fc-daygrid-day-frame) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
:global(.fc .fc-scroller-harness) {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
|
||||
:global(.fc-daygrid-day-events) {
|
||||
flex-grow: 1;
|
||||
/* Pushes events to take up available space */
|
||||
}
|
||||
|
||||
:global(.ev-pill.is-cancelled) {
|
||||
@@ -344,6 +346,9 @@ onMounted(() => {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
:global(#app > div > div.flex-1.min-h-0 > div > div > div > div.fc.fc-media-screen.fc-direction-ltr.fc-theme-standard > div.fc-view-harness.fc-view-harness-passive > div > table > thead > tr > th) {
|
||||
background-color: transparent;
|
||||
}
|
||||
:global(.fc .fc-daygrid-day-top) {
|
||||
padding: 8px 8px 0 8px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user