From 73777a231f0e2d2e07e158f22f1fc6428deb293a Mon Sep 17 00:00:00 2001 From: "Jan C. Borchardt" Date: Tue, 19 Jul 2022 12:27:16 +0200 Subject: [PATCH 1/6] Fix contrast issue with share icon Signed-off-by: Jan C. Borchardt --- src/components/AppNavigation/CalendarList/CalendarListItem.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AppNavigation/CalendarList/CalendarListItem.vue b/src/components/AppNavigation/CalendarList/CalendarListItem.vue index 25d30fedf..0d5106b15 100644 --- a/src/components/AppNavigation/CalendarList/CalendarListItem.vue +++ b/src/components/AppNavigation/CalendarList/CalendarListItem.vue @@ -517,6 +517,6 @@ export default { -- GitLab From a61c26aa4c4c7710383d028fbc62a883d452de90 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Fri, 18 Nov 2022 12:42:02 +0100 Subject: [PATCH 2/6] Delete X-ALT-DESC property value on changing the description Signed-off-by: Richard Steinmetz --- src/store/calendarObjectInstance.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/store/calendarObjectInstance.js b/src/store/calendarObjectInstance.js index d43260af0..6ae4f7da0 100644 --- a/src/store/calendarObjectInstance.js +++ b/src/store/calendarObjectInstance.js @@ -332,6 +332,9 @@ const mutations = { } } + // Delete custom description properties + calendarObjectInstance.eventComponent.deleteAllProperties('X-ALT-DESC') + calendarObjectInstance.eventComponent.description = description calendarObjectInstance.description = description }, -- GitLab From 8d168e8c4d8d5d82eace5da905fdc38830d0bb70 Mon Sep 17 00:00:00 2001 From: Anna Larch Date: Mon, 21 Nov 2022 14:49:50 +0100 Subject: [PATCH 3/6] Add location to booking VEVENT Signed-off-by: Anna Larch --- lib/Service/Appointments/BookingCalendarWriter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Service/Appointments/BookingCalendarWriter.php b/lib/Service/Appointments/BookingCalendarWriter.php index 9559d514e..1857f3a89 100644 --- a/lib/Service/Appointments/BookingCalendarWriter.php +++ b/lib/Service/Appointments/BookingCalendarWriter.php @@ -166,6 +166,10 @@ class BookingCalendarWriter { $vcalendar->VEVENT->add($alarm); } + if ($config->getLocation() !== null) { + $vcalendar->VEVENT->add('LOCATION', $config->getLocation()); + } + $vcalendar->VEVENT->add('X-NC-APPOINTMENT', $config->getToken()); $filename = $this->random->generate(32, ISecureRandom::CHAR_ALPHANUMERIC); -- GitLab From 2a885f5d53cdd0338691f0ff4465345df7d07a9a Mon Sep 17 00:00:00 2001 From: Anna Larch Date: Thu, 15 Dec 2022 12:04:47 +0100 Subject: [PATCH 4/6] Release v3.5.3 Signed-off-by: Anna Larch --- CHANGELOG.md | 6 ++++++ appinfo/info.xml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 077672afd..0fca8af51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog +## 3.5.3 - 2022-12-15 +### Fixed +- Delete X-ALT-DESC property on changing description +- Contrast issue with share icon +- Location in booking VEVENT + ## 3.5.2 - 2022-10-27 ### Fixed - Event calendar picker out of sync after moving event diff --git a/appinfo/info.xml b/appinfo/info.xml index d11af146a..5fd7ff5b5 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -15,7 +15,7 @@ * ☑️ Tasks! See tasks with a due date directly in the calendar * 🙈 **We’re not reinventing the wheel!** Based on the great [c-dav library](https://github.com/nextcloud/cdav-library), [ical.js](https://github.com/mozilla-comm/ical.js) and [fullcalendar](https://github.com/fullcalendar/fullcalendar) libraries. ]]> - 3.5.2 + 3.5.3 agpl Anna Larch Nextcloud Groupware Team diff --git a/package-lock.json b/package-lock.json index 7289a4186..c043d4770 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "calendar", - "version": "3.5.2", + "version": "3.5.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "calendar", - "version": "3.5.2", + "version": "3.5.3", "license": "agpl", "dependencies": { "@fullcalendar/core": "5.11.0", diff --git a/package.json b/package.json index 98ecf8720..1082e20c9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "calendar", "description": "A calendar app for Nextcloud. Easily sync events from various devices, share and edit them online.", - "version": "3.5.2", + "version": "3.5.3", "author": "Georg Ehrke ", "contributors": [ "Georg Ehrke ", -- GitLab From 5b3eda1f4a0234ad5183d7ca2712e2743f6a411b Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Tue, 25 Oct 2022 12:55:34 +0200 Subject: [PATCH 5/6] feat(alarms): improve email alarm RFC compliance Copy email addresses of attendees to alarm component. Signed-off-by: Richard Steinmetz --- src/store/calendarObjectInstance.js | 6 +++- src/utils/alarms.js | 45 +++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/src/store/calendarObjectInstance.js b/src/store/calendarObjectInstance.js index 6ae4f7da0..a23e95f8f 100644 --- a/src/store/calendarObjectInstance.js +++ b/src/store/calendarObjectInstance.js @@ -34,7 +34,9 @@ import { import { getAmountAndUnitForTimedEvents, getAmountHoursMinutesAndUnitForAllDayEvents, - getTotalSecondsFromAmountAndUnitForTimedEvents, getTotalSecondsFromAmountHourMinutesAndUnitForAllDayEvents, + getTotalSecondsFromAmountAndUnitForTimedEvents, + getTotalSecondsFromAmountHourMinutesAndUnitForAllDayEvents, + updateEmailAlarms, } from '../utils/alarms.js' import { getClosestCSS3ColorNameForHex, @@ -1541,6 +1543,8 @@ const actions = { const eventComponent = state.calendarObjectInstance.eventComponent const calendarObject = state.calendarObject + updateEmailAlarms(eventComponent) + if (eventComponent.isDirty()) { const isForkedItem = eventComponent.primaryItem !== null let original = null diff --git a/src/utils/alarms.js b/src/utils/alarms.js index 254a664dd..a77be3680 100644 --- a/src/utils/alarms.js +++ b/src/utils/alarms.js @@ -2,6 +2,7 @@ * @copyright Copyright (c) 2019 Georg Ehrke * * @author Georg Ehrke + * @author Richard Steinmetz * * @license AGPL-3.0-or-later * @@ -20,6 +21,9 @@ * */ +import { AttendeeProperty, Property } from '@nextcloud/calendar-js' +import { translate as t } from '@nextcloud/l10n' + /** * Get the factor for a given unit * @@ -212,3 +216,44 @@ export function getTotalSecondsFromAmountHourMinutesAndUnitForAllDayEvents(amoun return amount } + +/** + * Propagate data from an event component to all EMAIL alarm components. + * An alarm component must contain a description, summary and all attendees to be notified. + * We don't have a separate UI for maintaining attendees of an alarm, so we just copy them from the event. + * + * https://www.rfc-editor.org/rfc/rfc5545#section-3.6.6 + * + * @param {AbstractRecurringComponent} eventComponent + */ +export function updateEmailAlarms(eventComponent) { + for (const alarmComponent of eventComponent.getAlarmIterator()) { + if (alarmComponent.action !== 'EMAIL') { + continue + } + + alarmComponent.deleteAllProperties('SUMMARY') + const summaryProperty = eventComponent.getFirstProperty('SUMMARY') + if (summaryProperty) { + alarmComponent.addProperty(summaryProperty.clone()) + } else { + const defaultSummary = t('calendar', 'Untitled event') + alarmComponent.addProperty(new Property('SUMMARY', defaultSummary)) + } + + if (!alarmComponent.hasProperty('DESCRIPTION')) { + const defaultDescription = t('calendar', 'This is an event reminder.') + alarmComponent.addProperty(new Property('DESCRIPTION', defaultDescription)) + } + + alarmComponent.deleteAllProperties('ATTENDEE') + for (const attendee of eventComponent.getAttendeeIterator()) { + if (['RESOURCE', 'ROOM'].includes(attendee.userType)) { + continue + } + + // Only copy the email address (value) of the attendee + alarmComponent.addProperty(new AttendeeProperty('ATTENDEE', attendee.value)) + } + } +} -- GitLab From f5edcb9209d78c9eee42471b8305eb50b2332455 Mon Sep 17 00:00:00 2001 From: Anna Larch Date: Thu, 22 Dec 2022 17:08:30 +0100 Subject: [PATCH 6/6] Release v3.5.4 Signed-off-by: Anna Larch --- CHANGELOG.md | 4 ++++ appinfo/info.xml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fca8af51..c83284d1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog +## 3.5.4 - 2022-12-22 +### Fixed +- Handling of Email VALARMs + ## 3.5.3 - 2022-12-15 ### Fixed - Delete X-ALT-DESC property on changing description diff --git a/appinfo/info.xml b/appinfo/info.xml index 5fd7ff5b5..cae1e779c 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -15,7 +15,7 @@ * ☑️ Tasks! See tasks with a due date directly in the calendar * 🙈 **We’re not reinventing the wheel!** Based on the great [c-dav library](https://github.com/nextcloud/cdav-library), [ical.js](https://github.com/mozilla-comm/ical.js) and [fullcalendar](https://github.com/fullcalendar/fullcalendar) libraries. ]]> - 3.5.3 + 3.5.4 agpl Anna Larch Nextcloud Groupware Team diff --git a/package-lock.json b/package-lock.json index c043d4770..48205b81d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "calendar", - "version": "3.5.3", + "version": "3.5.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "calendar", - "version": "3.5.3", + "version": "3.5.4", "license": "agpl", "dependencies": { "@fullcalendar/core": "5.11.0", diff --git a/package.json b/package.json index 1082e20c9..b4067d429 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "calendar", "description": "A calendar app for Nextcloud. Easily sync events from various devices, share and edit them online.", - "version": "3.5.3", + "version": "3.5.4", "author": "Georg Ehrke ", "contributors": [ "Georg Ehrke ", -- GitLab