mirror of
https://github.com/yattee/yattee.git
synced 2026-06-09 16:24:20 +00:00
Make tvOS detail dismiss button opt-in and unstick more views
TVSidebarDetailContainer now exposes a showsDismissButton flag instead of always attaching a Done toolbar item. The button is only enabled where a view can end up with no focusable element on its own — Device Capabilities (informational rows) and the Import Playlists/Subscriptions flows. Wrap Contributors, Translators, Acknowledgements, and Device Capabilities destinations in TVSidebarDetailContainer for the consistent sidebar look, and make the Translators/Acknowledgements rows focusable on tvOS by wrapping them in Buttons so the Menu remote button can pop the stack.
This commit is contained in:
@@ -11,7 +11,6 @@ struct ImportPlaylistsView: View {
|
||||
let instance: Instance
|
||||
|
||||
@Environment(\.appEnvironment) private var appEnvironment
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
|
||||
@State private var playlists: [Playlist] = []
|
||||
@State private var importedPlaylistIDs: Set<String> = []
|
||||
@@ -60,15 +59,6 @@ struct ImportPlaylistsView: View {
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
#endif
|
||||
.toolbar {
|
||||
#if os(tvOS)
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
Button {
|
||||
dismiss()
|
||||
} label: {
|
||||
Label(String(localized: "common.done"), systemImage: "chevron.backward")
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if !unimportedPlaylists.isEmpty && importingPlaylistID == nil {
|
||||
ToolbarItem(placement: .primaryAction) {
|
||||
Button {
|
||||
|
||||
Reference in New Issue
Block a user