mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 08:18:19 +00:00
32 lines
840 B
Swift
32 lines
840 B
Swift
import Defaults
|
|
import SwiftUI
|
|
|
|
struct VideosListView: View {
|
|
var videos: [Video]
|
|
|
|
var body: some View {
|
|
Section {
|
|
List {
|
|
ForEach(videos) { video in
|
|
VideoListRowView(video: video)
|
|
.contextMenu { VideoContextMenuView(video: video) }
|
|
#if os(tvOS)
|
|
.listRowInsets(listRowInsets)
|
|
|
|
#elseif os(iOS)
|
|
.listRowInsets(EdgeInsets(.zero))
|
|
.listRowSeparator(.hidden)
|
|
#endif
|
|
}
|
|
}
|
|
#if os(tvOS)
|
|
.listStyle(GroupedListStyle())
|
|
#endif
|
|
}
|
|
}
|
|
|
|
var listRowInsets: EdgeInsets {
|
|
EdgeInsets(top: .zero, leading: .zero, bottom: .zero, trailing: 30)
|
|
}
|
|
}
|