Register the CalDAV and ICS calendar integrations

This commit is contained in:
raucao committed 2026-10-27 18:20:02 +04:00
1 parent 7ae1058b42
commit ba66a9c78f
2 files changed
+53 -4

No files matched your search

+16 -4
View File
@@ -81,14 +81,26 @@ export const INTEGRATIONS = [
reconnectable: false,
},
{
id: 'calendar',
label: 'Calendar',
description: 'Upcoming events from your calendars',
id: 'calendar-caldav',
label: 'CalDAV',
description: 'Upcoming events from your CalDAV calendars',
colorClass: 'bg-rose-500',
iconPath: CALENDAR_ICON_PATH,
iconFill: false,
available: true,
supportsMultiple: false,
supportsMultiple: true,
hasSettings: true,
reconnectable: false,
},
{
id: 'calendar-ics',
label: 'ICS / WebCal',
description: 'Upcoming events from a published calendar link',
colorClass: 'bg-rose-500',
iconPath: CALENDAR_ICON_PATH,
iconFill: false,
available: true,
supportsMultiple: true,
hasSettings: true,
reconnectable: false,
},
+37
View File
@@ -172,11 +172,48 @@ const ADAPTERS = {
return this.bitcoin.disable();
},
},
'calendar-caldav': {
instances() {
return this.calendar.instancesFor('calendar-caldav').map((instance) => ({
id: instance.id,
type: 'calendar-caldav',
label: instance.label,
url: instance.url,
// Passed through so the edit wizard can prefill the account and its
// calendar selection.
username: instance.username,
password: instance.password,
calendars: instance.calendars,
selectedCalendarIds: instance.selectedCalendarIds,
status: 'active',
canReconnect: false,
}));
},
remove(instance) {
return this.calendar.remove(instance);
},
},
'calendar-ics': {
instances() {
return this.calendar.instancesFor('calendar-ics').map((instance) => ({
id: instance.id,
type: 'calendar-ics',
label: instance.label,
url: instance.url,
status: 'active',
canReconnect: false,
}));
},
remove(instance) {
return this.calendar.remove(instance);
},
},
};
export default class IntegrationsService extends Service {
@service sites;
@service bitcoin;
@service calendar;
@service notifications;
// Registry metadata enriched with each type's live instances. Used by the Add