Files
MLBApp/mlbTVOS/Models/TeamAssets.swift
Trey t 65ad41840f Complete visual overhaul: warm light theme, stadium hero, inline pill nav
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>
2026-04-12 14:56:26 -05:00

80 lines
3.5 KiB
Swift

import SwiftUI
enum TeamAssets {
// MLB team ID mapping for logo URLs
static let teamIds: [String: Int] = [
"ARI": 109, "AZ": 109, "ATL": 144, "BAL": 110, "BOS": 111,
"CHC": 112, "CWS": 145, "CIN": 113, "CLE": 114, "COL": 115,
"DET": 116, "HOU": 117, "KC": 118, "LAA": 108, "LAD": 119,
"MIA": 146, "MIL": 158, "MIN": 142, "NYM": 121, "NYY": 147,
"OAK": 133, "ATH": 133, "PHI": 143, "PIT": 134, "SD": 135,
"SF": 137, "SEA": 136, "STL": 138, "TB": 139, "TEX": 140,
"TOR": 141, "WSH": 120,
]
// Primary team colors
static let teamColors: [String: Color] = [
"ARI": Color(red: 0.65, green: 0.10, blue: 0.19),
"ATL": Color(red: 0.81, green: 0.07, blue: 0.26),
"BAL": Color(red: 0.87, green: 0.31, blue: 0.07),
"BOS": Color(red: 0.74, green: 0.09, blue: 0.13),
"CHC": Color(red: 0.00, green: 0.19, blue: 0.56),
"CWS": Color(red: 0.15, green: 0.15, blue: 0.15),
"CIN": Color(red: 0.77, green: 0.06, blue: 0.15),
"CLE": Color(red: 0.00, green: 0.17, blue: 0.38),
"COL": Color(red: 0.20, green: 0.11, blue: 0.35),
"DET": Color(red: 0.00, green: 0.18, blue: 0.42),
"HOU": Color(red: 0.00, green: 0.18, blue: 0.39),
"KC": Color(red: 0.00, green: 0.22, blue: 0.53),
"LAA": Color(red: 0.73, green: 0.07, blue: 0.15),
"LAD": Color(red: 0.00, green: 0.22, blue: 0.56),
"MIA": Color(red: 0.00, green: 0.63, blue: 0.79),
"MIL": Color(red: 0.07, green: 0.15, blue: 0.34),
"MIN": Color(red: 0.00, green: 0.17, blue: 0.38),
"NYM": Color(red: 0.00, green: 0.18, blue: 0.48),
"NYY": Color(red: 0.00, green: 0.14, blue: 0.30),
"OAK": Color(red: 0.00, green: 0.30, blue: 0.18),
"ATH": Color(red: 0.00, green: 0.30, blue: 0.18),
"PHI": Color(red: 0.76, green: 0.08, blue: 0.18),
"PIT": Color(red: 0.99, green: 0.73, blue: 0.01),
"SD": Color(red: 0.18, green: 0.12, blue: 0.07),
"SF": Color(red: 0.99, green: 0.31, blue: 0.07),
"SEA": Color(red: 0.00, green: 0.22, blue: 0.36),
"STL": Color(red: 0.76, green: 0.10, blue: 0.15),
"TB": Color(red: 0.00, green: 0.18, blue: 0.46),
"TEX": Color(red: 0.00, green: 0.21, blue: 0.52),
"TOR": Color(red: 0.08, green: 0.25, blue: 0.52),
"WSH": Color(red: 0.67, green: 0.09, blue: 0.19),
]
static func color(for code: String) -> Color {
teamColors[code.uppercased()] ?? .gray
}
static func logoURL(for code: String) -> URL? {
guard let id = teamIds[code.uppercased()] else { return nil }
return URL(string: "https://midfield.mlbstatic.com/v1/team/\(id)/spots/72")
}
static func logoURL(forId id: Int) -> URL {
URL(string: "https://midfield.mlbstatic.com/v1/team/\(id)/spots/72")!
}
// Venue IDs for stadium hero photos
static let venueIds: [String: Int] = [
"ARI": 15, "AZ": 15, "ATL": 4705, "BAL": 2, "BOS": 3,
"CHC": 17, "CWS": 4, "CIN": 2602, "CLE": 5, "COL": 19,
"DET": 2394, "HOU": 2392, "KC": 7, "LAA": 1,
"LAD": 22, "MIA": 4169, "MIL": 32, "MIN": 3312,
"NYM": 3289, "NYY": 3313, "OAK": 10, "ATH": 10,
"PHI": 2681, "PIT": 31, "SD": 2680, "SF": 2395,
"SEA": 680, "STL": 2889, "TB": 12, "TEX": 5325,
"TOR": 14, "WSH": 3309,
]
static func stadiumURL(for code: String) -> URL? {
guard let id = venueIds[code.uppercased()] else { return nil }
return URL(string: "https://midfield.mlbstatic.com/v1/venue/\(id)/spots/1200")
}
}