diff --git a/plugins/calendar-resources/src/components/CreateEvent.svelte b/plugins/calendar-resources/src/components/CreateEvent.svelte index 7f990c1f00..47e72f19a3 100644 --- a/plugins/calendar-resources/src/components/CreateEvent.svelte +++ b/plugins/calendar-resources/src/components/CreateEvent.svelte @@ -29,6 +29,7 @@ import ReccurancePopup from './ReccurancePopup.svelte' import VisibilityEditor from './VisibilityEditor.svelte' import CalendarSelector from './CalendarSelector.svelte' + import LocationEditor from './LocationEditor.svelte' export let attachedTo: Ref = calendar.ids.NoAttached export let attachedToClass: Ref> = calendar.class.Event @@ -46,6 +47,7 @@ const duration = defaultDuration let dueDate = startDate + duration let allDay = false + let location = '' let reminders = [30 * 60 * 1000] @@ -93,6 +95,7 @@ participants, visibility, title, + location, allDay, access: 'owner', originalStartTime: allDay ? saveUTC(date) : date @@ -108,6 +111,7 @@ participants, reminders, title, + location, allDay, access: 'owner' }) @@ -163,6 +167,7 @@
+
diff --git a/plugins/calendar-resources/src/components/EditEvent.svelte b/plugins/calendar-resources/src/components/EditEvent.svelte index 89afea1396..727513561a 100644 --- a/plugins/calendar-resources/src/components/EditEvent.svelte +++ b/plugins/calendar-resources/src/components/EditEvent.svelte @@ -30,6 +30,7 @@ import ReccurancePopup from './ReccurancePopup.svelte' import VisibilityEditor from './VisibilityEditor.svelte' import CalendarSelector from './CalendarSelector.svelte' + import LocationEditor from './LocationEditor.svelte' export let object: Event $: readOnly = isReadOnly(object) @@ -48,6 +49,7 @@ let space = object.space let description = object.description + let location = object.location let rules: RecurringRule[] = (object as ReccuringEvent).rules ?? [] @@ -78,6 +80,9 @@ if (object.space !== space) { update.space = space } + if (object.location !== location) { + update.location = location + } if (allDay !== object.allDay) { update.date = allDay ? saveUTC(startDate) : startDate update.dueDate = allDay ? saveUTC(dueDate) : dueDate @@ -164,6 +169,7 @@
+
diff --git a/plugins/calendar-resources/src/components/LocationEditor.svelte b/plugins/calendar-resources/src/components/LocationEditor.svelte new file mode 100644 index 0000000000..332ba7d3a0 --- /dev/null +++ b/plugins/calendar-resources/src/components/LocationEditor.svelte @@ -0,0 +1,44 @@ + + +
+ +
+ + {#if isLink(value)} +
+
+ {/if} +
+
+ +