feat: iOS Einstellungen – Profil, Privatsphäre, geteilter Kalender

Neue Settings-Sektionen: Anzeigename + E-Mail ändern (Login-Name read-only),
Private-Termine-Sichtbarkeit (busy/hidden) und Auswahl des für Gruppen
sichtbaren Kalenders. Gezielte API-PUTs, damit nicht die ganze AppSettings
überschrieben wird.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Scarriffle
2026-05-31 19:35:22 +02:00
parent e7e4998fb9
commit 023f90be3b
3 changed files with 145 additions and 0 deletions

View File

@@ -414,6 +414,17 @@ class CalendarrAPI {
return json?["access_token"] as? String
}
// MARK: Targeted settings (avoid overwriting the whole AppSettings)
func updatePrivateVisibility(_ value: String) async throws {
_ = try await request("/api/settings/", method: "PUT", body: ["private_event_visibility": value])
}
func updateGroupVisibleCalendar(_ calendarId: Int?) async throws {
_ = try await request("/api/settings/", method: "PUT",
body: ["group_visible_calendar_id": calendarId as Any? ?? NSNull()])
}
// MARK: Sharing
func getUserDirectory() async throws -> [DirectoryUser] {