stremio/apps/ios/VMCTV/UI/MainHub.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

40 lines
1.3 KiB
Swift

import SwiftUI
struct MainHub: View {
@EnvironmentObject private var app: AppModel
var body: some View {
ZStack(alignment: .top) {
TvColors.bg.ignoresSafeArea()
Group {
switch app.tab {
case .home:
NavigationStack { HomeView() }
case .watchlist:
NavigationStack { WatchlistView() }
case .movies:
NavigationStack { BrowseView(kind: "MOVIE", title: "Films") }
case .series:
NavigationStack { BrowseView(kind: "SERIES", title: "Series") }
case .tv:
NavigationStack { LiveTvView() }
case .search:
NavigationStack { SearchView() }
case .settings:
NavigationStack { SettingsView() }
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.padding(.top, app.isPlaybackActive ? 0 : 92)
if !app.isPlaybackActive {
TopNav()
.zIndex(10)
.transition(.move(edge: .top).combined(with: .opacity))
}
}
.animation(.easeOut(duration: 0.22), value: app.isPlaybackActive)
.animation(.easeOut(duration: 0.2), value: app.tab)
}
}