stremio/apps/ios/VMCTV/UI/RootView.swift
Jos Vooges | STH ac951617cb Add Live Events across API/admin/Android TV, mobile ClearKey/DASH fixes, and tvOS app.
Wire FAAB schedule-events into master-api and admin IPTV settings, add Android TV Events UI, fix mobile ClearKey/stream playback (DASH + bump 1.0.23), and scaffold the Apple TV (VMCTV) client with docs/scripts.
2026-09-18 23:34:42 +02:00

68 lines
1.9 KiB
Swift

import SwiftUI
struct RootView: View {
@EnvironmentObject private var app: AppModel
var body: some View {
ZStack {
TvColors.bg.ignoresSafeArea()
switch app.phase {
case .boot:
SplashView()
case .server:
ServerChoiceView()
case .auth:
AuthChoiceView()
case .password:
PasswordLoginView()
case .link:
LinkView()
case .profiles:
ProfilesView()
case .main:
MainHub()
}
}
.animation(.easeInOut(duration: 0.32), value: app.phase)
}
}
struct SplashView: View {
@State private var pulse = false
@State private var glow = false
var body: some View {
ZStack {
LinearGradient(
colors: [
Color(red: 0.1, green: 0.02, blue: 0.04),
TvColors.bg,
],
startPoint: .top,
endPoint: .bottom
)
.ignoresSafeArea()
VStack(spacing: 28) {
Text("VMC")
.font(TvFonts.brand)
.foregroundStyle(TvColors.accent)
.scaleEffect(pulse ? 1.06 : 0.94)
.shadow(color: TvColors.accent.opacity(glow ? 0.65 : 0.25), radius: glow ? 42 : 12)
Text("Vonas Media Cluster")
.font(TvFonts.body)
.foregroundStyle(TvColors.textDim)
.opacity(pulse ? 1 : 0.7)
ProgressView()
.tint(TvColors.textDim)
.scaleEffect(1.3)
}
}
.onAppear {
withAnimation(.easeInOut(duration: 1.2).repeatForever(autoreverses: true)) {
pulse = true
glow = true
}
}
}
}