#134-Calendar-Upgrades #150

Merged
Ajdj100 merged 5 commits from #134-Calendar-Upgrades into main 2026-01-16 18:37:03 -06:00
2 changed files with 12 additions and 4 deletions
Showing only changes of commit 7d5e9c33bf - Show all commits

View File

@@ -31,9 +31,14 @@ watch(
{ immediate: true }
);
watch(loaded, (value) => {
if (value) emit('load');
});
const emit = defineEmits<{
(e: 'close'): void
(e: 'reload'): void
(e: 'load'): void
(e: 'edit', event: CalendarEvent): void
}>()
@@ -302,11 +307,14 @@ defineExpose({ forceReload })
</section>
</div>
</div>
<div v-else class="flex justify-center h-full items-center">
<Button variant="ghost" size="icon" @click="emit('close')">
<div v-else class="relative flex justify-center items-center h-full">
<!-- Close button (top-right) -->
<Button variant="ghost" size="icon" class="absolute top-2 right-2" @click="emit('close')">
<X class="size-5" />
</Button>
<Spinner class="size-8"></Spinner>
<!-- Spinner (centered) -->
<Spinner class="size-8" />
</div>
</template>

View File

@@ -211,7 +211,7 @@ onMounted(() => {
class="3xl:w-lg 2xl:w-md 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()" @edit="(val) => { dialogRef.openDialog(null, 'edit', val) }">
@reload="loadEvents()" @load="calendarRef.getApi().updateSize()" @edit="(val) => { dialogRef.openDialog(null, 'edit', val) }">
</ViewCalendarEvent>
</aside>
</div>