UI overhaul: new color palette, trip creation improvements, crash fix
Theme: - New teal/cyan/mint/pink/gold color palette replacing orange/cream - Added Theme.swift, ViewModifiers.swift, AnimatedComponents.swift Trip Creation: - Removed Drive/Fly toggle (drive-only for now) - Removed Lodging Type picker - Renamed "Number of Stops" to "Number of Cities" with explanation - Added explanation for "Find Other Sports Along Route" - Removed staggered animation from trip options list Bug Fix: - Disabled AI route description generation (Foundation Models crashes in iOS 26.2 Simulator due to NLLanguageRecognizer assertion failure) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -72,7 +72,7 @@ extension Game: Equatable {
|
||||
|
||||
// MARK: - Rich Game Model (with resolved references)
|
||||
|
||||
struct RichGame: Identifiable, Hashable {
|
||||
struct RichGame: Identifiable, Hashable, Codable {
|
||||
let game: Game
|
||||
let homeTeam: Team
|
||||
let awayTeam: Team
|
||||
|
||||
@@ -45,13 +45,14 @@ enum Sport: String, Codable, CaseIterable, Identifiable {
|
||||
}
|
||||
}
|
||||
|
||||
var seasonMonths: ClosedRange<Int> {
|
||||
/// Season start and end months (1-12). End may be less than start for seasons that wrap around the year.
|
||||
var seasonMonths: (start: Int, end: Int) {
|
||||
switch self {
|
||||
case .mlb: return 3...10 // March - October
|
||||
case .nba: return 10...6 // October - June (wraps)
|
||||
case .nhl: return 10...6 // October - June (wraps)
|
||||
case .nfl: return 9...2 // September - February (wraps)
|
||||
case .mls: return 2...12 // February - December
|
||||
case .mlb: return (3, 10) // March - October
|
||||
case .nba: return (10, 6) // October - June (wraps)
|
||||
case .nhl: return (10, 6) // October - June (wraps)
|
||||
case .nfl: return (9, 2) // September - February (wraps)
|
||||
case .mls: return (2, 12) // February - December
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,12 +60,13 @@ enum Sport: String, Codable, CaseIterable, Identifiable {
|
||||
let calendar = Calendar.current
|
||||
let month = calendar.component(.month, from: date)
|
||||
|
||||
let range = seasonMonths
|
||||
if range.lowerBound <= range.upperBound {
|
||||
return range.contains(month)
|
||||
let (start, end) = seasonMonths
|
||||
if start <= end {
|
||||
// Normal range (e.g., March to October)
|
||||
return month >= start && month <= end
|
||||
} else {
|
||||
// Season wraps around year boundary
|
||||
return month >= range.lowerBound || month <= range.upperBound
|
||||
// Season wraps around year boundary (e.g., October to June)
|
||||
return month >= start || month <= end
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user