Changed popover to modal on small screens

This commit is contained in:
Alexis
2025-04-25 14:58:47 +02:00
parent 5b8fedba7c
commit f7f12feaec
2 changed files with 63 additions and 3 deletions

View File

@@ -12,6 +12,10 @@ const props = defineProps<{
faded?: boolean
}>()
const emit = defineEmits<{
(e: "on-open-create-dialog", date: RPGDate): void
}>()
const calendarTile = ref()
const calendarEventsList = ref()
@@ -153,7 +157,12 @@ const eventsNotDisplayed: ComputedRef<number> = computed<number>(() => eventsFo
</ClientOnly>
<ClientOnly>
<LazyCalendarDialogCreateEvent v-if="!isReadOnly" :date btn-class="absolute inset-0 w-full h-full cursor-default z-0" />
<LazyCalendarDialogCreateEvent v-if="!isReadOnly && breakpoints.lg.value" :date btn-class="absolute inset-0 w-full h-full cursor-default z-0" />
<button
v-else-if="!isReadOnly && !breakpoints.lg.value"
class="absolute inset-0 w-full h-full cursor-default z-0"
@click="emit('on-open-create-dialog', props.date)"
/>
</ClientOnly>
</div>
</template>