mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 00:08:21 +00:00
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() }
|
|
}
|
|
}
|