feat: enforce custom Theme colors app-wide, add debug sample trips and poll
Replace all system colors (.secondary, Color(.secondarySystemBackground), etc.) with Theme.textPrimary/textSecondary/textMuted/cardBackground/ surfaceGlow across 13 views. Remove PostHog debug logging. Add debug settings for sample trips and hardcoded group poll preview. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,7 @@ struct GamesHistoryView: View {
|
||||
}
|
||||
|
||||
private struct GamesHistoryContent: View {
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
@Bindable var viewModel: GamesHistoryViewModel
|
||||
@Binding var selectedVisit: StadiumVisit?
|
||||
|
||||
@@ -50,6 +51,7 @@ private struct GamesHistoryContent: View {
|
||||
HStack {
|
||||
Text("\(viewModel.totalGamesCount) Games")
|
||||
.font(.headline)
|
||||
.foregroundStyle(Theme.textPrimary(colorScheme))
|
||||
Spacer()
|
||||
|
||||
if !viewModel.selectedSports.isEmpty {
|
||||
@@ -68,9 +70,10 @@ private struct GamesHistoryContent: View {
|
||||
)
|
||||
}
|
||||
.padding()
|
||||
.background(Color(.systemBackground))
|
||||
.background(Theme.cardBackground(colorScheme))
|
||||
|
||||
Divider()
|
||||
.overlay(Theme.surfaceGlow(colorScheme))
|
||||
|
||||
// Games list grouped by year
|
||||
if viewModel.filteredVisits.isEmpty {
|
||||
@@ -85,7 +88,7 @@ private struct GamesHistoryContent: View {
|
||||
)
|
||||
}
|
||||
}
|
||||
.background(Color(.systemGroupedBackground))
|
||||
.background(Theme.backgroundGradient(colorScheme))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +114,7 @@ private struct SportFilterChips: View {
|
||||
}
|
||||
|
||||
private struct SportChip: View {
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
let sport: Sport
|
||||
let isSelected: Bool
|
||||
let onTap: () -> Void
|
||||
@@ -124,12 +128,12 @@ private struct SportChip: View {
|
||||
Text(sport.rawValue)
|
||||
.font(.caption.bold())
|
||||
}
|
||||
.foregroundStyle(isSelected ? .white : .primary)
|
||||
.foregroundStyle(isSelected ? .white : Theme.textPrimary(colorScheme))
|
||||
.padding(.horizontal, 12)
|
||||
.padding(.vertical, 6)
|
||||
.background(
|
||||
Capsule()
|
||||
.fill(isSelected ? sport.themeColor : Color(.systemGray5))
|
||||
.fill(isSelected ? sport.themeColor : Theme.cardBackgroundElevated(colorScheme))
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
@@ -185,33 +189,38 @@ private struct GamesListByYear: View {
|
||||
}
|
||||
|
||||
private struct YearHeader: View {
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
let year: Int
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
Text(String(year))
|
||||
.font(.title3.bold())
|
||||
.foregroundStyle(Theme.textPrimary(colorScheme))
|
||||
Spacer()
|
||||
}
|
||||
.padding(.horizontal)
|
||||
.padding(.vertical, 8)
|
||||
.background(Color(.systemGroupedBackground))
|
||||
.background(Theme.backgroundGradient(colorScheme))
|
||||
}
|
||||
}
|
||||
|
||||
private struct EmptyGamesView: View {
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 16) {
|
||||
Image(systemName: "ticket")
|
||||
.font(.largeTitle)
|
||||
.foregroundStyle(.secondary)
|
||||
.foregroundStyle(Theme.textMuted(colorScheme))
|
||||
|
||||
Text("No games recorded yet")
|
||||
.font(.headline)
|
||||
.foregroundStyle(Theme.textPrimary(colorScheme))
|
||||
|
||||
Text("Add your first stadium visit to see it here!")
|
||||
.font(.subheadline)
|
||||
.foregroundStyle(.secondary)
|
||||
.foregroundStyle(Theme.textSecondary(colorScheme))
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
|
||||
Reference in New Issue
Block a user