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)
|
#if os(iOS)
|
||||||
.environment(\.editMode, isEditMode ? .constant(.active) : .constant(.inactive))
|
.environment(\.editMode, isEditMode ? .constant(.active) : .constant(.inactive))
|
||||||
#endif
|
#endif
|
||||||
|
#if !os(tvOS)
|
||||||
.navigationTitle(String(localized: "home.settings.title"))
|
.navigationTitle(String(localized: "home.settings.title"))
|
||||||
|
#endif
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -79,7 +79,14 @@ private struct CustomizationSection: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
Section {
|
Section {
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
|
#if os(tvOS)
|
||||||
|
TVSidebarDetailContainer(
|
||||||
|
systemImage: SidebarItem.home.systemImage,
|
||||||
|
title: String(localized: "settings.appearance.home.customize")
|
||||||
|
) { HomeSettingsView() }
|
||||||
|
#else
|
||||||
HomeSettingsView()
|
HomeSettingsView()
|
||||||
|
#endif
|
||||||
} label: {
|
} label: {
|
||||||
Label(String(localized: "settings.appearance.home.customize"), systemImage: SidebarItem.home.systemImage)
|
Label(String(localized: "settings.appearance.home.customize"), systemImage: SidebarItem.home.systemImage)
|
||||||
}
|
}
|
||||||
@@ -101,12 +108,21 @@ private struct CustomizationSection: View {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if os(macOS) || os(tvOS)
|
#if os(macOS)
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
SidebarSettingsView()
|
SidebarSettingsView()
|
||||||
} label: {
|
} label: {
|
||||||
Label(String(localized: "settings.sidebar.title"), systemImage: "sidebar.leading")
|
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
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,7 +136,9 @@ struct SidebarSettingsView: View {
|
|||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.environment(\.editMode, .constant(.active))
|
.environment(\.editMode, .constant(.active))
|
||||||
#endif
|
#endif
|
||||||
|
#if !os(tvOS)
|
||||||
.navigationTitle(String(localized: "settings.sidebar.title"))
|
.navigationTitle(String(localized: "settings.sidebar.title"))
|
||||||
|
#endif
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user