feat: calendar settings, matrix drill-down, FAB fix, in-app add calendar

- Calendar: redesign connect sheet with Local Calendars grouped view (Default/Other/Subscribed), per-calendar Show/Hide toggle, master enabled toggle, Do Not Disturb toggle; Add Calendar now in-app with Google/Outlook/iCloud/CalDAV/Exchange/Holidays/URL flows instead of opening iOS Calendar app
- Calendar: fix toggle icon (calendar.day.timeline.left / list.bullet.below.rectangle), maintain full month view when switching to task list mode
- Matrix: quadrant header tap drills into detail view (Overdue/Later/Completed sections), task tap opens edit sheet; fix navigationDestination iOS 16 compat
- Tasks: functional reminder picker in date sheet with inline time wheel; birthday NLP detection sets yearly recurrence; dynamic repeat option labels; quadrant badge picker replaces priority flags
- Notifications: fix actor isolation crash in mark-complete handler; per-task reminder scheduling uses reminderDate field; evening check-in notification
- FAB: fix + button hidden behind custom tab bar in TodayView, CalendarView, MatrixView — move background out of ZStack children into .background() modifier
- TaskItem: add reminderDate, recurrenceLabel, endDate, isAllDay fields; Quadrant adds roman/matrixLabel/color/softColor; TaskViewModel adds updateTask/pin/setDate/setCategory

Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
This commit is contained in:
Robin Kutesa
2026-06-01 13:14:14 +03:00
parent 8bf4d91053
commit f96f09ec29
6 changed files with 1542 additions and 269 deletions

View File

@@ -12,10 +12,12 @@ struct TaskItem: Identifiable, Codable, Equatable {
var category: TaskCategory = .reminder
var taskColor: TaskColor = .orange
var isRecurring: Bool = false
var recurrenceLabel: String? = nil
var isPinned: Bool = false
var endDate: Date? = nil
var isAllDay: Bool = false
var priority: Priority = .none
var reminderDate: Date? = nil
}
enum Priority: String, Codable, CaseIterable, Identifiable {
@@ -50,6 +52,42 @@ enum Quadrant: String, CaseIterable, Identifiable, Codable {
case schedule = "Schedule It"
case delegate_ = "Delegate"
case eliminate = "Eliminate"
var roman: String {
switch self {
case .urgent: return "I"
case .schedule: return "II"
case .delegate_: return "III"
case .eliminate: return "IV"
}
}
var matrixLabel: String {
switch self {
case .urgent: return "Urgent & Important"
case .schedule: return "Not Urgent & Important"
case .delegate_: return "Urgent & Unimportant"
case .eliminate: return "Not Urgent & Unimportant"
}
}
var color: Color {
switch self {
case .urgent: return AppColors.accent
case .schedule: return AppColors.yellow
case .delegate_: return AppColors.blue
case .eliminate: return AppColors.green
}
}
var softColor: Color {
switch self {
case .urgent: return AppColors.accentSoft
case .schedule: return AppColors.yellowSoft
case .delegate_: return AppColors.blueSoft
case .eliminate: return AppColors.greenSoft
}
}
}
enum TaskCategory: String, Codable {
@@ -189,13 +227,30 @@ class TaskViewModel: ObservableObject {
func addTask(title: String, dueDate: Date?, hasTime: Bool = false,
quadrant: Quadrant = .urgent, category: TaskCategory = .reminder,
taskColor: TaskColor = .orange, isRecurring: Bool = false,
recurrenceLabel: String? = nil,
endDate: Date? = nil, isAllDay: Bool = false,
priority: Priority = .none) {
priority: Priority = .none, reminderDate: Date? = nil) {
tasks.append(TaskItem(title: title, dueDate: dueDate, hasTime: hasTime,
quadrant: quadrant, category: category,
taskColor: taskColor, isRecurring: isRecurring,
recurrenceLabel: recurrenceLabel,
endDate: endDate, isAllDay: isAllDay,
priority: priority))
priority: priority, reminderDate: reminderDate))
save()
}
func updateTask(_ task: TaskItem, title: String, dueDate: Date?, hasTime: Bool,
isRecurring: Bool, recurrenceLabel: String?,
endDate: Date?, isAllDay: Bool, reminderDate: Date?) {
guard let idx = tasks.firstIndex(where: { $0.id == task.id }) else { return }
tasks[idx].title = title
tasks[idx].dueDate = dueDate
tasks[idx].hasTime = hasTime
tasks[idx].isRecurring = isRecurring
tasks[idx].recurrenceLabel = recurrenceLabel
tasks[idx].endDate = endDate
tasks[idx].isAllDay = isAllDay
tasks[idx].reminderDate = reminderDate
save()
}