mirror of
https://github.com/yattee/yattee.git
synced 2026-05-13 10:55:03 +00:00
Show left-column icon and title for Home and Sidebar settings on tvOS
This commit is contained in:
@@ -43,7 +43,9 @@ struct HomeSettingsView: View {
|
||||
#if os(iOS)
|
||||
.environment(\.editMode, isEditMode ? .constant(.active) : .constant(.inactive))
|
||||
#endif
|
||||
#if !os(tvOS)
|
||||
.navigationTitle(String(localized: "home.settings.title"))
|
||||
#endif
|
||||
#if os(iOS)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
#endif
|
||||
|
||||
@@ -79,7 +79,14 @@ private struct CustomizationSection: View {
|
||||
var body: some View {
|
||||
Section {
|
||||
NavigationLink {
|
||||
#if os(tvOS)
|
||||
TVSidebarDetailContainer(
|
||||
systemImage: SidebarItem.home.systemImage,
|
||||
title: String(localized: "settings.appearance.home.customize")
|
||||
) { HomeSettingsView() }
|
||||
#else
|
||||
HomeSettingsView()
|
||||
#endif
|
||||
} label: {
|
||||
Label(String(localized: "settings.appearance.home.customize"), systemImage: SidebarItem.home.systemImage)
|
||||
}
|
||||
@@ -101,12 +108,21 @@ private struct CustomizationSection: View {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if os(macOS) || os(tvOS)
|
||||
#if os(macOS)
|
||||
NavigationLink {
|
||||
SidebarSettingsView()
|
||||
} label: {
|
||||
Label(String(localized: "settings.sidebar.title"), systemImage: "sidebar.leading")
|
||||
}
|
||||
#elseif os(tvOS)
|
||||
NavigationLink {
|
||||
TVSidebarDetailContainer(
|
||||
systemImage: "sidebar.leading",
|
||||
title: String(localized: "settings.sidebar.title")
|
||||
) { SidebarSettingsView() }
|
||||
} label: {
|
||||
Label(String(localized: "settings.sidebar.title"), systemImage: "sidebar.leading")
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,9 @@ struct SidebarSettingsView: View {
|
||||
#if os(iOS)
|
||||
.environment(\.editMode, .constant(.active))
|
||||
#endif
|
||||
#if !os(tvOS)
|
||||
.navigationTitle(String(localized: "settings.sidebar.title"))
|
||||
#endif
|
||||
#if os(iOS)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user