Initial implementation of Fantasy Hockey watchOS app
Implemented complete TCA architecture for iOS and watchOS targets: - Authentication flow (Sign in with Apple + Yahoo OAuth) - OAuth token management with iCloud Key-Value Storage - Yahoo Fantasy Sports API client with async/await - Watch Connectivity for iPhone ↔ Watch data sync - Complete UI for both iPhone and Watch platforms Core features: - Matchup score display - Category breakdown with win/loss/tie indicators - Roster status tracking - Manual refresh functionality - Persistent data caching on Watch Technical stack: - The Composable Architecture for state management - Swift Concurrency (async/await, actors) - WatchConnectivity framework - Sign in with Apple - OAuth 2.0 authentication flow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// RosterStatusView.swift
|
||||
// FantasyWatch Watch App
|
||||
//
|
||||
// Created by Claude Code
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct RosterStatusView: View {
|
||||
let roster: RosterStatus
|
||||
|
||||
var body: some View {
|
||||
List {
|
||||
HStack {
|
||||
Text("Active")
|
||||
.font(.caption)
|
||||
Spacer()
|
||||
Text("\(roster.activeCount)")
|
||||
.font(.body)
|
||||
.fontWeight(.semibold)
|
||||
.foregroundColor(.green)
|
||||
}
|
||||
|
||||
HStack {
|
||||
Text("Benched")
|
||||
.font(.caption)
|
||||
Spacer()
|
||||
Text("\(roster.benchedCount)")
|
||||
.font(.body)
|
||||
.fontWeight(.semibold)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
||||
HStack {
|
||||
Text("Injured Reserve")
|
||||
.font(.caption)
|
||||
Spacer()
|
||||
Text("\(roster.injuredReserve)")
|
||||
.font(.body)
|
||||
.fontWeight(.semibold)
|
||||
.foregroundColor(roster.injuredReserve > 0 ? .red : .secondary)
|
||||
}
|
||||
|
||||
HStack {
|
||||
Text("Total")
|
||||
.font(.caption)
|
||||
.fontWeight(.semibold)
|
||||
Spacer()
|
||||
Text("\(roster.totalPlayers)")
|
||||
.font(.body)
|
||||
.fontWeight(.bold)
|
||||
}
|
||||
}
|
||||
.navigationTitle("Roster")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
NavigationStack {
|
||||
RosterStatusView(roster: RosterStatus(activeCount: 10, benchedCount: 5, injuredReserve: 2))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user