mirror of
https://github.com/yattee/yattee.git
synced 2026-06-08 07:44:21 +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:
@@ -26,9 +26,6 @@ struct AcknowledgementsView: View {
|
||||
|
||||
@ViewBuilder
|
||||
private func dependencyLink(_ name: String, url: String) -> some View {
|
||||
#if os(tvOS)
|
||||
Text(name)
|
||||
#else
|
||||
Button {
|
||||
if let url = URL(string: url) {
|
||||
openURL(url)
|
||||
@@ -37,15 +34,16 @@ struct AcknowledgementsView: View {
|
||||
HStack {
|
||||
Text(name)
|
||||
Spacer()
|
||||
#if !os(tvOS)
|
||||
Image(systemName: "arrow.up.right")
|
||||
.foregroundStyle(.secondary)
|
||||
#endif
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
#if os(macOS)
|
||||
.buttonStyle(.plain)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user