mirror of
https://github.com/yattee/yattee.git
synced 2024-12-14 22:30:32 +05:30
23 lines
660 B
Swift
23 lines
660 B
Swift
import SwiftUI
|
|
|
|
struct VideosView: View {
|
|
@EnvironmentObject private var profile: Profile
|
|
|
|
@Binding var tabSelection: TabSelection
|
|
var videos: [Video]
|
|
|
|
@State private var showingViewOptions = false
|
|
|
|
var body: some View {
|
|
Section {
|
|
if self.profile.listing == .list {
|
|
VideosListView(tabSelection: $tabSelection, videos: videos)
|
|
} else {
|
|
VideosCellsView(videos: videos, columns: self.profile.cellsColumns)
|
|
}
|
|
}
|
|
.fullScreenCover(isPresented: $showingViewOptions) { ViewOptionsView() }
|
|
.onPlayPauseCommand { showingViewOptions.toggle() }
|
|
}
|
|
}
|