Open queue sheet from tvOS player controls

Turn the tvOS bottom-row queue count indicator into a focusable button
that opens QueueManagementSheet in a fullScreenCover with an
ultraThinMaterial backdrop, matching the Settings sheet pattern. Hide
the sheet's close toolbar button on tvOS (Menu button dismisses) and
replace the unusable Menu-based queue mode picker with an icon-only
tap-to-cycle button.
This commit is contained in:
Arkadiusz Fal
2026-04-15 03:56:38 +02:00
parent 9aeb329b64
commit 29782035f7
3 changed files with 50 additions and 7 deletions

View File

@@ -16,6 +16,7 @@ struct TVPlayerControlsView: View {
@FocusState.Binding var focusedControl: TVPlayerFocusTarget?
let onShowSettings: () -> Void
let onShowQueue: () -> Void
let onShowDetails: () -> Void
let onShowComments: () -> Void
let onShowDebug: () -> Void
@@ -241,15 +242,20 @@ struct TVPlayerControlsView: View {
Spacer()
// Queue indicator (if videos in queue)
// Queue button (if videos in queue)
if let state = playerState, state.hasNext {
HStack(spacing: 8) {
Image(systemName: "list.bullet")
.font(.system(size: 20))
Text(String(localized: "queue.section.count \(state.queue.count)"))
.font(.subheadline)
Button {
onShowQueue()
} label: {
VStack(spacing: 6) {
Image(systemName: "list.bullet")
.font(.system(size: 28))
Text(String(localized: "queue.section.count \(state.queue.count)"))
.font(.caption)
}
}
.foregroundStyle(.white.opacity(0.6))
.buttonStyle(TVActionButtonStyle())
.focused($focusedControl, equals: .queueButton)
}
}
}