Add web UI for CalDAV calendars (web/calendar)

- List of the user's own calendars (web/calendar)
- Month view per calendar with a Monday-first 6-week grid, showing
  all-day and timed events, colored dot matching the calendar's color
- Navigation between months (prev/next/today) via query params
- Create/edit/delete events: title, description, location, all-day
  toggle, start/end date+time
- Clicking a day cell prefills a new all-day event on that date; the
  "New event" button defaults to a one-hour slot starting next full hour
- Deleting an event or invalid time ranges (end before/equal start) are
  validated with inline error messages
- Verified round-trip with the real CalDAV protocol handler (events
  created via the web UI are correctly visible to a REPORT query)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-08-20 16:58:59 +02:00
co-authored by Copilot
parent 3fa0297715
commit cd2cfa6c06
9 changed files with 1691 additions and 3 deletions
+5
View File
@@ -54,6 +54,11 @@ func (s *Server) Handler(staticFS http.FileSystem) http.Handler {
mux.HandleFunc("/contacts/{book}/{id}/edit", s.requireLogin(s.handleContactEdit))
mux.HandleFunc("/contacts/{book}/{id}/delete", s.requireLogin(s.handleContactDelete))
mux.HandleFunc("/contacts/{book}/{id}/export", s.requireLogin(s.handleContactExportOne))
mux.HandleFunc("/calendar", s.requireLogin(s.handleCalendarsHome))
mux.HandleFunc("/calendar/{cal}", s.requireLogin(s.handleCalendarMonth))
mux.HandleFunc("/calendar/{cal}/new", s.requireLogin(s.handleEventNew))
mux.HandleFunc("/calendar/{cal}/{id}/edit", s.requireLogin(s.handleEventEdit))
mux.HandleFunc("/calendar/{cal}/{id}/delete", s.requireLogin(s.handleEventDelete))
return mux
}