mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 08:18:19 +00:00
29 lines
791 B
Swift
29 lines
791 B
Swift
import Defaults
|
|
import SwiftUI
|
|
|
|
struct VideoDetailsOverlay: View {
|
|
@EnvironmentObject<PlayerControlsModel> private var controls
|
|
|
|
@State private var detailsPage = VideoDetails.DetailsPage.queue
|
|
|
|
var body: some View {
|
|
VideoDetails(page: $detailsPage, sidebarQueue: .constant(false), fullScreen: fullScreenBinding)
|
|
.clipShape(RoundedRectangle(cornerRadius: 4))
|
|
}
|
|
|
|
var fullScreenBinding: Binding<Bool> {
|
|
.init(get: {
|
|
controls.presentingDetailsOverlay
|
|
}, set: { newValue in
|
|
controls.presentingDetailsOverlay = newValue
|
|
})
|
|
}
|
|
}
|
|
|
|
struct VideoDetailsOverlay_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
VideoDetailsOverlay()
|
|
.injectFixtureEnvironmentObjects()
|
|
}
|
|
}
|