Add team autocomplete and themed backgrounds to Log Visit sheet

- Add autocomplete suggestions for Home/Away team fields filtered by selected sport
- Apply themed background to StadiumVisitSheet and StadiumPickerSheet
- Add listRowBackground for consistent card styling in Form sections
- Fix data observation with @ObservedObject for AppDataProvider
- Clear team names when sport selection changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-01-08 20:32:44 -06:00
parent 92d808caf5
commit 588938d2a1
2 changed files with 133 additions and 45 deletions

View File

@@ -106,52 +106,36 @@ struct AnimatedRouteGraphic: View {
// MARK: - Themed Spinner
/// A custom animated spinner matching the app's visual style
/// Both ThemedSpinner and ThemedSpinnerCompact use the same visual style for consistency
struct ThemedSpinner: View {
var size: CGFloat = 40
var lineWidth: CGFloat = 4
var color: Color = Theme.warmOrange
@State private var rotation: Double = 0
@State private var trimEnd: CGFloat = 0.6
var body: some View {
ZStack {
// Background track
Circle()
.stroke(Theme.warmOrange.opacity(0.15), lineWidth: lineWidth)
.stroke(color.opacity(0.2), lineWidth: lineWidth)
// Animated arc
Circle()
.trim(from: 0, to: trimEnd)
.stroke(
AngularGradient(
gradient: Gradient(colors: [Theme.warmOrange, Theme.routeGold, Theme.warmOrange.opacity(0.3)]),
center: .center,
startAngle: .degrees(0),
endAngle: .degrees(360)
),
style: StrokeStyle(lineWidth: lineWidth, lineCap: .round)
)
.trim(from: 0, to: 0.7)
.stroke(color, style: StrokeStyle(lineWidth: lineWidth, lineCap: .round))
.rotationEffect(.degrees(rotation))
// Center glow dot
Circle()
.fill(Theme.warmOrange.opacity(0.2))
.frame(width: size * 0.3, height: size * 0.3)
.blur(radius: 4)
}
.frame(width: size, height: size)
.onAppear {
withAnimation(.linear(duration: 1).repeatForever(autoreverses: false)) {
withAnimation(.linear(duration: 0.8).repeatForever(autoreverses: false)) {
rotation = 360
}
withAnimation(.easeInOut(duration: 0.8).repeatForever(autoreverses: true)) {
trimEnd = 0.8
}
}
}
}
/// Compact themed spinner for inline use
/// Compact themed spinner for inline use (same style as ThemedSpinner, smaller default)
struct ThemedSpinnerCompact: View {
var size: CGFloat = 20
var color: Color = Theme.warmOrange
@@ -159,16 +143,23 @@ struct ThemedSpinnerCompact: View {
@State private var rotation: Double = 0
var body: some View {
Circle()
.trim(from: 0, to: 0.7)
.stroke(color, style: StrokeStyle(lineWidth: size > 16 ? 2.5 : 2, lineCap: .round))
.frame(width: size, height: size)
.rotationEffect(.degrees(rotation))
.onAppear {
withAnimation(.linear(duration: 0.8).repeatForever(autoreverses: false)) {
rotation = 360
}
ZStack {
// Background track
Circle()
.stroke(color.opacity(0.2), lineWidth: size > 16 ? 2.5 : 2)
// Animated arc
Circle()
.trim(from: 0, to: 0.7)
.stroke(color, style: StrokeStyle(lineWidth: size > 16 ? 2.5 : 2, lineCap: .round))
.rotationEffect(.degrees(rotation))
}
.frame(width: size, height: size)
.onAppear {
withAnimation(.linear(duration: 0.8).repeatForever(autoreverses: false)) {
rotation = 360
}
}
}
}