feat: publish local calendars via two-way CalDAV (opt-in, secret token URL)
Backend:
- LocalCalendar gains caldav_published + dav_token + dav_ctag; LocalEvent gains
etag (migrations in main.py). bump_dav() refreshes ctag/etag on every local
event write (create/update/delete/import).
- local_router: PUT /calendars/{id} accepts caldav_published (mints/revokes
token), new POST /calendars/{id}/dav-token/rotate, _cal_dict exposes
caldav_published + caldav_url.
- New dav_router mounted at root (/dav/{token}/...): a minimal two-way CalDAV
server (OPTIONS/PROPFIND/REPORT/GET/PUT/DELETE) reusing ical_io build/parse,
ctag-based change detection. Secret token = auth, no login.
Frontend:
- Settings calendar table: per-local-calendar publish toggle + subscribe URL
with copy and token-rotate; i18n (de/en) and styling.
Note: reverse proxy must allow WebDAV methods (PROPFIND/REPORT/PUT/DELETE).
VALARM/reminders are not round-tripped via CalDAV.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -114,6 +114,15 @@ const translations = {
|
||||
reminders_calendar_off: 'Für diesen Kalender sind Benachrichtigungen deaktiviert – Erinnerungen werden nicht ausgeführt.',
|
||||
calendar_reminders_on: 'Benachrichtigungen aktiviert',
|
||||
calendar_reminders_off: 'Benachrichtigungen deaktiviert',
|
||||
copy: 'Kopieren',
|
||||
caldav_publish: 'CalDAV veröffentlichen',
|
||||
caldav_unpublish: 'CalDAV deaktivieren',
|
||||
caldav_published_url: 'CalDAV-URL:',
|
||||
caldav_url_copied: 'CalDAV-URL kopiert',
|
||||
caldav_token_rotate: 'Token neu generieren',
|
||||
caldav_token_rotated: 'Neuer Token erzeugt – alte Abos müssen neu eingerichtet werden',
|
||||
caldav_rotate_confirm: 'Neuen Token erzeugen? Die bisherige URL wird ungültig und bestehende Abos müssen mit der neuen URL neu eingerichtet werden.',
|
||||
caldav_hint: 'Jeder mit dieser URL kann diesen Kalender abonnieren und bearbeiten. Über CalDAV-fähige Clients (Apple Kalender, Thunderbird, DAVx5) einbinden.',
|
||||
share: 'Teilen',
|
||||
import: 'Importieren',
|
||||
export: 'Exportieren',
|
||||
@@ -407,6 +416,15 @@ const translations = {
|
||||
reminders_calendar_off: 'Reminders are disabled for this calendar – they will not fire.',
|
||||
calendar_reminders_on: 'Reminders enabled',
|
||||
calendar_reminders_off: 'Reminders disabled',
|
||||
copy: 'Copy',
|
||||
caldav_publish: 'Publish via CalDAV',
|
||||
caldav_unpublish: 'Unpublish CalDAV',
|
||||
caldav_published_url: 'CalDAV URL:',
|
||||
caldav_url_copied: 'CalDAV URL copied',
|
||||
caldav_token_rotate: 'Regenerate token',
|
||||
caldav_token_rotated: 'New token generated – existing subscriptions must be re-added',
|
||||
caldav_rotate_confirm: 'Generate a new token? The current URL will stop working and existing subscriptions must be re-added with the new URL.',
|
||||
caldav_hint: 'Anyone with this URL can subscribe to and edit this calendar. Add it in a CalDAV-capable client (Apple Calendar, Thunderbird, DAVx5).',
|
||||
share: 'Share',
|
||||
import: 'Import',
|
||||
export: 'Export',
|
||||
|
||||
Reference in New Issue
Block a user