Update fantastical open cmds

This commit is contained in:
Hariharan Mudaliar 2026-04-06 11:29:23 +05:30
commit ab7d2619d7
No known key found for this signature in database
GPG key ID: 025583EB0BE5640E
4 changed files with 94 additions and 19 deletions

View file

@ -2752,6 +2752,8 @@ struct CalendarSettings: View {
@Default(.lockScreenCalendarSelectionMode) private var lockScreenCalendarSelectionMode
@Default(.lockScreenSelectedCalendarIDs) private var lockScreenSelectedCalendarIDs
@Default(.lockScreenShowCalendarEventAfterStartEnabled) private var lockScreenShowCalendarEventAfterStartEnabled
@Default(.useFantasticalCalendar) private var useFantasticalCalendar
@Default(.fantasticalDefaultView) private var fantasticalDefaultView
private func highlightID(_ title: String) -> String {
SettingsTab.calendar.highlightID(for: title)
@ -3045,6 +3047,32 @@ struct CalendarSettings: View {
.disabled(!lockScreenShowCalendarEvent)
.settingsHighlight(id: highlightID("Show start time after event begins"))
}
// MARK: - Third-party Calendar Integration
Section {
Defaults.Toggle(key: .useFantasticalCalendar) {
HStack {
Image(systemName: "calendar.badge.clock")
.foregroundColor(.red)
.frame(width: 20, height: 20)
Text("Use Fantastical")
}
}
.settingsHighlight(id: highlightID("Use Fantastical"))
if useFantasticalCalendar {
Picker("Default View", selection: $fantasticalDefaultView) {
ForEach(FantasticalViewStyle.allCases, id: \.self) { style in
Text(style.displayName).tag(style)
}
}
.settingsHighlight(id: highlightID("Fantastical Default View"))
}
} header: {
Text("Third-party Calendar Integration")
} footer: {
Text("When enabled, clicking on calendar events will open Fantastical instead of Apple Calendar. More integrations coming soon.")
}
Section(header: Text("Select Calendars")) {
let grouped = Dictionary(grouping: calendarManager.allCalendars, by: \.accountName)