Inspired by vtv/Dribbble streaming concept. Every dark surface replaced
with warm off-white (#F5F3F0) and white cards with soft shadows.
Design System: Warm off-white background, white card fills, subtle drop
shadows, dark text hierarchy, warm orange accent (#F27326) replacing
blue as primary interactive color. Added onDark color variants for hero
overlays. Shadow system with card/lifted states.
Navigation: Replaced TabView with inline CategoryPillBar — horizontal
orange pills (Today | Intel | Highlights | Multi-View | Settings).
Single scrolling view, no system chrome. Multi-View as icon button
with stream count badge. Settings as gear icon.
Stadium Hero: Full-bleed stadium photos from MLB CDN
(mlbstatic.com/v1/venue/{id}/spots/1200) as featured game background.
Left gradient overlay for text readability. Live games show score +
inning + DiamondView count/outs. Scheduled games show probable pitchers
with headshots + records. Final games show final score. Warm orange
"Watch Now" CTA pill. Added venue ID mapping for all 30 stadiums to
TeamAssets.
Game Cards: White cards with team color top bar, horizontal team rows,
dark text, soft shadows. Record + streak on every card.
Intel Tab: All dark panels replaced with white cards + shadows.
Replaced dark gradient screen background with flat warm off-white.
58 hardcoded .white.opacity() values replaced with DS.Colors tokens.
Feed Tab: Already used DS.Colors — inherits light theme automatically.
Focus: tvOS focus style uses warm orange border highlight + lifted
shadow instead of white glow on dark.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
69 lines
1.9 KiB
Swift
69 lines
1.9 KiB
Swift
import SwiftUI
|
|
|
|
// MARK: - iOS Press Style
|
|
|
|
struct PlatformPressButtonStyle: ButtonStyle {
|
|
func makeBody(configuration: Configuration) -> some View {
|
|
configuration.label
|
|
.scaleEffect(configuration.isPressed ? 0.98 : 1.0)
|
|
.opacity(configuration.isPressed ? 0.92 : 1.0)
|
|
.animation(.easeOut(duration: 0.16), value: configuration.isPressed)
|
|
}
|
|
}
|
|
|
|
// MARK: - tvOS Focus Style (Light Theme)
|
|
|
|
#if os(tvOS)
|
|
struct TVFocusButtonStyle: ButtonStyle {
|
|
@Environment(\.isFocused) private var isFocused
|
|
|
|
func makeBody(configuration: Configuration) -> some View {
|
|
configuration.label
|
|
.scaleEffect(configuration.isPressed ? 0.97 : isFocused ? 1.04 : 1.0)
|
|
.opacity(configuration.isPressed ? 0.85 : 1.0)
|
|
.shadow(
|
|
color: isFocused ? DS.Shadows.cardLifted : .clear,
|
|
radius: isFocused ? DS.Shadows.cardLiftedRadius : 0,
|
|
y: isFocused ? DS.Shadows.cardLiftedY : 0
|
|
)
|
|
.overlay(
|
|
RoundedRectangle(cornerRadius: 22, style: .continuous)
|
|
.strokeBorder(DS.Colors.interactive.opacity(isFocused ? 0.5 : 0), lineWidth: 2.5)
|
|
)
|
|
.animation(.easeInOut(duration: 0.2), value: isFocused)
|
|
.animation(.easeOut(duration: 0.12), value: configuration.isPressed)
|
|
}
|
|
}
|
|
#endif
|
|
|
|
// MARK: - Platform Extensions
|
|
|
|
extension View {
|
|
@ViewBuilder
|
|
func platformCardStyle() -> some View {
|
|
#if os(tvOS)
|
|
self.buttonStyle(TVFocusButtonStyle())
|
|
#else
|
|
self.buttonStyle(PlatformPressButtonStyle())
|
|
#endif
|
|
}
|
|
|
|
@ViewBuilder
|
|
func platformFocusSection() -> some View {
|
|
#if os(tvOS)
|
|
self.focusSection()
|
|
#else
|
|
self
|
|
#endif
|
|
}
|
|
|
|
@ViewBuilder
|
|
func platformFocusable(_ enabled: Bool = true) -> some View {
|
|
#if os(tvOS)
|
|
self.focusable(enabled)
|
|
#else
|
|
self
|
|
#endif
|
|
}
|
|
}
|