Add calendar integration configuration

This commit is contained in:
raucao committed 2026-10-27 17:38:30 +04:00
1 parent 39cab362da
commit cdc84ffa75
1 file changed
+38
+38
View File
@@ -0,0 +1,38 @@
// Calendar integration configuration. The integration is a non-tile widget
// (like Bitcoin): it owns its own service and form and does not appear as a
// dashboard site.
// Storage key for the single calendar instance in the `integrations`
// namespace. Calendar supports one connection (an account or a public feed).
export const CALENDAR_INTEGRATION_KEY = 'calendar';
// How the calendar is sourced. `account` uses CalDAV credentials and a
// calendar selection; `public` reads a read-only `.ics`/`webcal:` feed.
export const CALENDAR_MODE_ACCOUNT = 'account';
export const CALENDAR_MODE_PUBLIC = 'public';
export const CALENDAR_MODES = [
{
value: CALENDAR_MODE_ACCOUNT,
label: 'CalDAV account',
description: 'Connect with a username and app password.',
},
{
value: CALENDAR_MODE_PUBLIC,
label: 'Public calendar link',
description: 'Read a read-only .ics or webcal:// feed.',
},
];
// The Sockethub actor used for the calendar session. It must be stable across
// the credentials, fetch, and query messages so they share one session.
export const CALENDAR_ACTOR = { id: 'caldav:dashtab', type: 'person' };
// The dashboard shows today plus the next two days.
export const CALENDAR_WINDOW_DAYS = 3;
// Poll interval for refreshing events, in milliseconds.
export const CALENDAR_REFRESH_INTERVAL = 300000;
// Upper bound on rendered events, to keep the widget compact.
export const CALENDAR_MAX_EVENTS = 10;