Merge develop -> main: full session (KC-51 through KC-71) #28

Merged
kutesir merged 64 commits from develop into main 2026-07-12 22:57:14 +00:00
Showing only changes of commit e8d74d4f59 - Show all commits

View File

@@ -595,8 +595,7 @@ struct CalendarView: View {
isCurrentMonth: cal.isDate(date, equalTo: displayMonth, toGranularity: .month),
isToday: cal.isDateInToday(date),
isSelected: cal.isDate(date, inSameDayAs: selectedDate),
bars: eventDots(for: date),
highlightColumn: !monthExpanded && cal.isDate(date, inSameDayAs: selectedDate)
bars: eventDots(for: date)
)
.onTapGesture {
withAnimation(KisaniSpring.snappy) {
@@ -609,19 +608,9 @@ struct CalendarView: View {
}
}
.padding(.horizontal, 16)
.gesture(DragGesture(minimumDistance: 30).onEnded { v in
let dx = v.translation.width, dy = v.translation.height
if abs(dx) > abs(dy) {
// Horizontal swipe previous/next month
if dx < -40 { navigateMonth(1) }
else if dx > 40 { navigateMonth(-1) }
} else {
// Vertical drag collapse to week (up) / expand to month (down)
withAnimation(KisaniSpring.snappy) {
if dy < -30 { monthExpanded = false }
else if dy > 30 { monthExpanded = true }
}
}
.gesture(DragGesture(minimumDistance: 40).onEnded { v in
if v.translation.width < -40 { navigateMonth(1) }
else if v.translation.width > 40 { navigateMonth(-1) }
})
// Grabber expand back to the full month, or collapse to the week.
@@ -1743,7 +1732,6 @@ struct AddCalendarHolidaysView: View {
struct DayCell: View {
@Environment(\.colorScheme) private var cs
let date: Date; let isCurrentMonth: Bool; let isToday: Bool; let isSelected: Bool; let bars: [Color]
var highlightColumn: Bool = false
private let cal = Calendar.current
var dayNum: String { "\(cal.component(.day, from: date))" }
/// Locale week-of-year (NOT ISO), intentionally matching the locale-driven grid
@@ -1780,12 +1768,7 @@ struct DayCell: View {
.padding(.horizontal, 3)
Spacer(minLength: 0)
}
.padding(.top, 4)
.frame(maxWidth: .infinity).frame(height: 54).contentShape(Rectangle())
.background(
RoundedRectangle(cornerRadius: 10)
.fill(highlightColumn ? AppColors.text3(cs).opacity(0.12) : .clear)
)
}
}