mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 00:08:21 +00:00
26 lines
668 B
Swift
26 lines
668 B
Swift
import Defaults
|
|
import SwiftUI
|
|
|
|
struct VideosView: View {
|
|
@EnvironmentObject private var profile: Profile
|
|
|
|
var videos: [Video]
|
|
|
|
@Default(.layout) var layout
|
|
@Default(.tabSelection) var tabSelection
|
|
|
|
@State private var showingViewOptions = false
|
|
|
|
var body: some View {
|
|
VStack {
|
|
if layout == .cells {
|
|
VideosCellsView(videos: videos, columns: self.profile.cellsColumns)
|
|
} else {
|
|
VideosListView(videos: videos)
|
|
}
|
|
}
|
|
.fullScreenCover(isPresented: $showingViewOptions) { ViewOptionsView() }
|
|
.onPlayPauseCommand { showingViewOptions.toggle() }
|
|
}
|
|
}
|