SwiftUI app against master API: link, profiles, browse, live TV, favorites sync, and TestFlight-ready assets. Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
1.1 KiB
Swift
43 lines
1.1 KiB
Swift
import SwiftUI
|
|
|
|
struct RootView: View {
|
|
@EnvironmentObject private var app: AppModel
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
McColors.bg.ignoresSafeArea()
|
|
switch app.phase {
|
|
case .boot:
|
|
SplashView()
|
|
case .link:
|
|
LinkScreen()
|
|
case .profiles:
|
|
ProfilesScreen()
|
|
case .main:
|
|
MainShell()
|
|
}
|
|
}
|
|
.animation(.easeInOut(duration: 0.28), value: app.phase)
|
|
}
|
|
}
|
|
|
|
struct SplashView: View {
|
|
@State private var pulse = false
|
|
|
|
var body: some View {
|
|
VStack(spacing: 18) {
|
|
Text("VMC")
|
|
.font(McFonts.brand)
|
|
.foregroundStyle(McColors.accent)
|
|
.scaleEffect(pulse ? 1.04 : 0.96)
|
|
.shadow(color: McColors.accent.opacity(0.45), radius: pulse ? 24 : 8)
|
|
ProgressView()
|
|
.tint(McColors.textDim)
|
|
}
|
|
.onAppear {
|
|
withAnimation(.easeInOut(duration: 1.1).repeatForever(autoreverses: true)) {
|
|
pulse = true
|
|
}
|
|
}
|
|
}
|
|
}
|