Porting SwiftUI da Android (auth, hub, wizard, broadcast RTMP, overlay, scoring board-aware), reload hub al ritorno da diretta, decodifica score tollerante e documentazione allineata. Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
764 B
Swift
28 lines
764 B
Swift
import SwiftUI
|
|
|
|
struct SplashScreen: View {
|
|
@ObservedObject var container: AppContainer
|
|
let onAuthenticated: () -> Void
|
|
let onUnauthenticated: () -> Void
|
|
|
|
var body: some View {
|
|
MatchScreenScaffold {
|
|
ZStack {
|
|
MatchLiveWordmark(showSlogan: true)
|
|
ProgressView()
|
|
.tint(MatchColors.primaryRed)
|
|
.frame(maxHeight: .infinity, alignment: .bottom)
|
|
.padding(.bottom, 48)
|
|
}
|
|
}
|
|
.task {
|
|
container.bootstrapAuth()
|
|
if await container.authRepository.validateOrRefresh() != nil {
|
|
onAuthenticated()
|
|
} else {
|
|
onUnauthenticated()
|
|
}
|
|
}
|
|
}
|
|
}
|