mirror of
https://github.com/yattee/yattee.git
synced 2026-06-07 23:34:19 +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:
@@ -23,19 +23,34 @@ struct AboutView: View {
|
||||
SettingsFormSection {
|
||||
#if os(tvOS)
|
||||
NavigationLink {
|
||||
ContributorsView()
|
||||
TVSidebarDetailContainer(
|
||||
systemImage: "person.3",
|
||||
title: String(localized: "settings.contributors.title")
|
||||
) {
|
||||
ContributorsView()
|
||||
}
|
||||
} label: {
|
||||
Label(String(localized: "settings.contributors.title"), systemImage: "person.3")
|
||||
}
|
||||
|
||||
NavigationLink {
|
||||
TranslationContributorsView()
|
||||
TVSidebarDetailContainer(
|
||||
systemImage: "globe",
|
||||
title: String(localized: "settings.translators.title")
|
||||
) {
|
||||
TranslationContributorsView()
|
||||
}
|
||||
} label: {
|
||||
Label(String(localized: "settings.translators.title"), systemImage: "globe")
|
||||
}
|
||||
|
||||
NavigationLink {
|
||||
AcknowledgementsView()
|
||||
TVSidebarDetailContainer(
|
||||
systemImage: "heart.text.square",
|
||||
title: String(localized: "settings.acknowledgements.title")
|
||||
) {
|
||||
AcknowledgementsView()
|
||||
}
|
||||
} label: {
|
||||
Label(String(localized: "settings.acknowledgements.title"), systemImage: "heart.text.square")
|
||||
}
|
||||
@@ -58,7 +73,13 @@ struct AboutView: View {
|
||||
SettingsFormSection {
|
||||
#if os(tvOS)
|
||||
NavigationLink {
|
||||
DeviceCapabilitiesView()
|
||||
TVSidebarDetailContainer(
|
||||
systemImage: "cpu",
|
||||
title: String(localized: "settings.advanced.deviceCapabilities"),
|
||||
showsDismissButton: true
|
||||
) {
|
||||
DeviceCapabilitiesView()
|
||||
}
|
||||
} label: {
|
||||
Label(String(localized: "settings.advanced.deviceCapabilities"), systemImage: "cpu")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user