Redesign trip option cards and fix various UI/planning issues
TripOptionCard improvements: - Replace horizontal route with vertical layout (start → end with arrow) - Remove rank badges (1, 2, 3, etc.) - Split stats into two rows: cities/miles and sports with game counts - Clear selection when navigating back from detail view Settings cleanup: - Remove unused settings (preferred game time, playoff games, notifications) - Convert remaining settings to sliders Planning fixes: - Fix multi-day driving calculation in canTransition - Remove over-restrictive trip rejection in TravelEstimator - Clear games cache when sport selection changes UI polish: - RoutePreviewStrip shows all cities (abbreviated) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -227,6 +227,7 @@ struct TripPreferences: Codable, Hashable {
|
||||
var lodgingType: LodgingType
|
||||
var numberOfDrivers: Int
|
||||
var maxDrivingHoursPerDriver: Double?
|
||||
var maxTripOptions: Int
|
||||
|
||||
init(
|
||||
planningMode: PlanningMode = .dateRange,
|
||||
@@ -246,7 +247,8 @@ struct TripPreferences: Codable, Hashable {
|
||||
needsEVCharging: Bool = false,
|
||||
lodgingType: LodgingType = .hotel,
|
||||
numberOfDrivers: Int = 1,
|
||||
maxDrivingHoursPerDriver: Double? = nil
|
||||
maxDrivingHoursPerDriver: Double? = nil,
|
||||
maxTripOptions: Int = 10
|
||||
) {
|
||||
self.planningMode = planningMode
|
||||
self.startLocation = startLocation
|
||||
@@ -266,6 +268,7 @@ struct TripPreferences: Codable, Hashable {
|
||||
self.lodgingType = lodgingType
|
||||
self.numberOfDrivers = numberOfDrivers
|
||||
self.maxDrivingHoursPerDriver = maxDrivingHoursPerDriver
|
||||
self.maxTripOptions = maxTripOptions
|
||||
}
|
||||
|
||||
var totalDriverHoursPerDay: Double {
|
||||
|
||||
@@ -147,12 +147,12 @@ struct RoutePreviewStrip: View {
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: 4) {
|
||||
ForEach(Array(cities.prefix(5).enumerated()), id: \.offset) { index, city in
|
||||
ForEach(Array(cities.enumerated()), id: \.offset) { index, city in
|
||||
if index > 0 {
|
||||
// Connector line
|
||||
Rectangle()
|
||||
.fill(Theme.routeGold.opacity(0.5))
|
||||
.frame(width: 16, height: 2)
|
||||
.frame(width: 12, height: 2)
|
||||
}
|
||||
|
||||
// City dot with label
|
||||
@@ -167,12 +167,6 @@ struct RoutePreviewStrip: View {
|
||||
.lineLimit(1)
|
||||
}
|
||||
}
|
||||
|
||||
if cities.count > 5 {
|
||||
Text("+\(cities.count - 5)")
|
||||
.font(.system(size: 10, weight: .medium))
|
||||
.foregroundStyle(Theme.textMuted(colorScheme))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user