From 2105cc6cc412d33c541e811ee6dc271329638a6e Mon Sep 17 00:00:00 2001 From: Till JS Date: Wed, 1 Apr 2026 22:33:40 +0200 Subject: [PATCH] feat(manacore/web): add share via uLoad to calendar events and contacts Adds ShareNetwork button and ShareModal to calendar event detail and contact detail views for creating short links via shared-uload. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/routes/(app)/calendar/+page.svelte | 33 ++++++++++++++++++- .../routes/(app)/contacts/[id]/+page.svelte | 28 ++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/apps/manacore/apps/web/src/routes/(app)/calendar/+page.svelte b/apps/manacore/apps/web/src/routes/(app)/calendar/+page.svelte index c5e2cea45..0fa0d4221 100644 --- a/apps/manacore/apps/web/src/routes/(app)/calendar/+page.svelte +++ b/apps/manacore/apps/web/src/routes/(app)/calendar/+page.svelte @@ -24,7 +24,8 @@ isToday, } from 'date-fns'; import { de } from 'date-fns/locale'; - import { CaretLeft, CaretRight, Plus } from '@manacore/shared-icons'; + import { CaretLeft, CaretRight, Plus, ShareNetwork } from '@manacore/shared-icons'; + import { ShareModal } from '@manacore/shared-uload'; const calendarsCtx: { readonly value: Calendar[] } = getContext('calendars'); const eventsCtx: { readonly value: CalendarEvent[] } = getContext('calendarEvents'); @@ -164,6 +165,14 @@ showEventForm = false; } + // Share modal state + let shareEvent = $state(null); + let shareUrl = $derived( + shareEvent + ? `${typeof window !== 'undefined' ? window.location.origin : ''}/calendar?event=${shareEvent.id}` + : '' + ); + // Hours for the week grid const hours = Array.from({ length: 24 }, (_, i) => i); @@ -540,6 +549,18 @@ > Löschen + {/if}