mirror of
https://github.com/yattee/yattee.git
synced 2024-12-14 22:30:32 +05:30
27 lines
634 B
Swift
27 lines
634 B
Swift
import Defaults
|
|
import SwiftUI
|
|
|
|
struct VideosView: View {
|
|
@State private var profile = Profile()
|
|
|
|
@Default(.layout) var layout
|
|
@Default(.tabSelection) var tabSelection
|
|
|
|
@Default(.showingAddToPlaylist) var showingAddToPlaylist
|
|
|
|
var videos: [Video]
|
|
|
|
var body: some View {
|
|
VStack {
|
|
if layout == .cells {
|
|
VideosCellsView(videos: videos, columns: self.profile.cellsColumns)
|
|
} else {
|
|
VideosListView(videos: videos)
|
|
}
|
|
}
|
|
.fullScreenCover(isPresented: $showingAddToPlaylist) {
|
|
AddToPlaylistView()
|
|
}
|
|
}
|
|
}
|