Video details changes and channel sheet

This commit is contained in:
Arkadiusz Fal
2023-04-22 10:56:42 +02:00
parent 5db74a3997
commit 67690bc435
15 changed files with 389 additions and 256 deletions

View File

@@ -27,6 +27,7 @@ struct PlayerSettings: View {
@Default(.openWatchNextOnClose) private var openWatchNextOnClose
@Default(.openWatchNextOnFinishedWatching) private var openWatchNextOnFinishedWatching
@Default(.openWatchNextOnFinishedWatchingDelay) private var openWatchNextOnFinishedWatchingDelay
@Default(.showInspector) private var showInspector
@ObservedObject private var accounts = AccountsModel.shared
@@ -68,6 +69,12 @@ struct PlayerSettings: View {
#endif
}
#if !os(tvOS)
Section(header: SettingsHeader(text: "Inspector".localized())) {
inspectorVisibilityPicker
}
#endif
Section(header: SettingsHeader(text: "Watch Next")) {
openWatchNextOnFinishedWatchingToggle
openWatchNextOnFinishedWatchingDelayTextField
@@ -235,6 +242,14 @@ struct PlayerSettings: View {
Toggle("Close PiP and open player when application enters foreground", isOn: $closePiPAndOpenPlayerOnEnteringForeground)
}
#endif
private var inspectorVisibilityPicker: some View {
Picker("Visibility", selection: $showInspector) {
Text("Always").tag(ShowInspectorSetting.always)
Text("Only for local files and URLs").tag(ShowInspectorSetting.onlyLocal)
}
.labelsHidden()
}
}
struct PlayerSettings_Previews: PreviewProvider {