Add calendar color support (DAVx5 calendar-color)
Calendars can now have a color (hex, e.g. #3b82f6) that DAVx5 and other
CalDAV clients pick up via the Apple/dav4jvm calendar-color property.
- db: add calendars.color column with migration for existing DBs;
CreateCalendarWithColor, SetCalendarColor, GetCalendarColor;
ListCalendars now returns []Calendar{Name, Color} instead of []string
- caldav: since go-webdav's caldav.Backend interface has no extension
point for vendor properties, wrap the handler with a response-rewriting
middleware that injects <calendar-color xmlns="http://apple.com/ns/ical/">
into PROPFIND responses for calendars that have a color set
- web: color picker on the "New calendar" form and an inline color swatch/
picker on each calendar card (calendars only, not address books)
- nidusctl: `calendar create --color` flag and a new `calendar color`
subcommand; `calendar list` now also prints the color if set
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -32,8 +32,8 @@ func TestCreateAndDeleteCalendarViaWebUI(t *testing.T) {
|
||||
t.Fatalf("ListCalendars: %v", err)
|
||||
}
|
||||
found := false
|
||||
for _, n := range names {
|
||||
if n == "vacation" {
|
||||
for _, c := range names {
|
||||
if c.Name == "vacation" {
|
||||
found = true
|
||||
}
|
||||
}
|
||||
@@ -67,8 +67,8 @@ func TestCreateAndDeleteCalendarViaWebUI(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("ListCalendars: %v", err)
|
||||
}
|
||||
for _, n := range names {
|
||||
if n == "vacation" {
|
||||
for _, c := range names {
|
||||
if c.Name == "vacation" {
|
||||
t.Fatalf("expected vacation calendar to be gone, got %v", names)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user