feat(sharing): let share recipients recolour a shared calendar

The colour dot for a shared (non-owned) local calendar was disabled and the
colour write hit the owner-only PUT /calendars/{id} (404 for recipients). The
dot is now always editable and colour changes go through the dedicated
PUT /calendars/{id}/color endpoint, storing a recipient's own per-user colour
server-side (synced across devices) without granting write or rename. Renaming
stays owner-only. Parity with Android + server.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Scarriffle
2026-07-06 20:57:53 +02:00
parent 32cb8e1689
commit c4195243c0
2 changed files with 7 additions and 2 deletions

View File

@@ -169,7 +169,9 @@ struct AccountsView: View {
} else {
ForEach(localCalendars) { cal in
HStack {
CalendarColorDot(hex: cal.color, editable: cal.owned) { hex in
// Recipients of a shared calendar may recolour it (their
// own per-user colour); renaming stays owner-only.
CalendarColorDot(hex: cal.color, editable: true) { hex in
try? await api.updateLocalCalendarColor(id: cal.id, color: hex)
}
Text(cal.name)