mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 00:08:21 +00:00
31 lines
686 B
Swift
31 lines
686 B
Swift
import Defaults
|
|
import SwiftUI
|
|
|
|
struct VideosView: View {
|
|
@EnvironmentObject<NavigationState> private var navigationState
|
|
|
|
#if os(tvOS)
|
|
@Default(.layout) private var layout
|
|
#endif
|
|
|
|
var videos: [Video]
|
|
|
|
var body: some View {
|
|
VStack {
|
|
#if os(tvOS)
|
|
if layout == .cells {
|
|
VideosCellsVertical(videos: videos)
|
|
} else {
|
|
VideosListView(videos: videos)
|
|
}
|
|
#else
|
|
VideosCellsVertical(videos: videos)
|
|
#endif
|
|
}
|
|
#if os(macOS)
|
|
.background()
|
|
.frame(minWidth: 360)
|
|
#endif
|
|
}
|
|
}
|