Update settings menu order

This commit is contained in:
Arkadiusz Fal 2022-07-03 22:22:57 +02:00
parent f07e3ebef9
commit 95c963eca8
2 changed files with 17 additions and 16 deletions

View File

@ -18,6 +18,7 @@ struct FixtureEnvironmentObjectsModifier: ViewModifier {
.environmentObject(PlaylistsModel()) .environmentObject(PlaylistsModel())
.environmentObject(RecentsModel()) .environmentObject(RecentsModel())
.environmentObject(SearchModel()) .environmentObject(SearchModel())
.environmentObject(SettingsModel())
.environmentObject(subscriptions) .environmentObject(subscriptions)
.environmentObject(ThumbnailsModel()) .environmentObject(ThumbnailsModel())
} }

View File

@ -5,10 +5,10 @@ import SwiftUI
struct SettingsView: View { struct SettingsView: View {
#if os(macOS) #if os(macOS)
private enum Tabs: Hashable { private enum Tabs: Hashable {
case browsing, player, history, sponsorBlock, locations, advanced, help case locations, browsing, player, history, sponsorBlock, advanced, help
} }
@State private var selection = Tabs.browsing @State private var selection = Tabs.locations
#endif #endif
@Environment(\.colorScheme) private var colorScheme @Environment(\.colorScheme) private var colorScheme
@ -32,6 +32,14 @@ struct SettingsView: View {
var settings: some View { var settings: some View {
#if os(macOS) #if os(macOS)
TabView(selection: $selection) { TabView(selection: $selection) {
Form {
LocationsSettings()
}
.tabItem {
Label("Locations", systemImage: "globe")
}
.tag(Tabs.locations)
Form { Form {
BrowsingSettings() BrowsingSettings()
} }
@ -64,14 +72,6 @@ struct SettingsView: View {
} }
.tag(Tabs.sponsorBlock) .tag(Tabs.sponsorBlock)
Form {
LocationsSettings()
}
.tabItem {
Label("Locations", systemImage: "globe")
}
.tag(Tabs.locations)
Group { Group {
AdvancedSettings() AdvancedSettings()
} }
@ -121,6 +121,12 @@ struct SettingsView: View {
} }
#endif #endif
NavigationLink {
LocationsSettings()
} label: {
Label("Locations", systemImage: "globe")
}
NavigationLink { NavigationLink {
BrowsingSettings() BrowsingSettings()
} label: { } label: {
@ -145,12 +151,6 @@ struct SettingsView: View {
Label("SponsorBlock", systemImage: "dollarsign.circle") Label("SponsorBlock", systemImage: "dollarsign.circle")
} }
NavigationLink {
LocationsSettings()
} label: {
Label("Locations", systemImage: "globe")
}
NavigationLink { NavigationLink {
AdvancedSettings() AdvancedSettings()
} label: { } label: {