mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Details panels in controls
This commit is contained in:
25
Shared/Player/Controls/VideoDetailsOverlay.swift
Normal file
25
Shared/Player/Controls/VideoDetailsOverlay.swift
Normal file
@@ -0,0 +1,25 @@
|
||||
import Defaults
|
||||
import SwiftUI
|
||||
|
||||
struct VideoDetailsOverlay: View {
|
||||
@EnvironmentObject<PlayerControlsModel> private var controls
|
||||
|
||||
var body: some View {
|
||||
VideoDetails(sidebarQueue: false, fullScreen: fullScreenBinding)
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user