Create Lock Screen Reminder Widget

This commit is contained in:
Hariharan Mudaliar 2025-11-11 01:32:11 +05:30
commit 436d5a4e96
10 changed files with 465 additions and 0 deletions

View file

@ -957,6 +957,8 @@ struct CalendarSettings: View {
@Default(.reminderPresentationStyle) var reminderPresentationStyle
@Default(.reminderLeadTime) var reminderLeadTime
@Default(.reminderSneakPeekDuration) var reminderSneakPeekDuration
@Default(.enableLockScreenReminderWidget) var enableLockScreenReminderWidget
@Default(.lockScreenReminderChipStyle) var lockScreenReminderChipStyle
var body: some View {
Form {
@ -1042,6 +1044,18 @@ struct CalendarSettings: View {
}
}
Section(header: Text("Lock Screen Reminder Widget")) {
Defaults.Toggle("Show lock screen reminder", key: .enableLockScreenReminderWidget)
Picker("Chip color", selection: $lockScreenReminderChipStyle) {
ForEach(LockScreenReminderChipStyle.allCases) { style in
Text(style.rawValue).tag(style)
}
}
.pickerStyle(.segmented)
.disabled(!enableLockScreenReminderWidget || !enableReminderLiveActivity)
}
Section(header: Text("Select Calendars")) {
List {
ForEach(calendarManager.allCalendars, id: \.id) { calendar in