1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 06:10:32 +05:30

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(RecentsModel())
.environmentObject(SearchModel())
.environmentObject(SettingsModel())
.environmentObject(subscriptions)
.environmentObject(ThumbnailsModel())
}

View File

@ -5,10 +5,10 @@ import SwiftUI
struct SettingsView: View {
#if os(macOS)
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
@Environment(\.colorScheme) private var colorScheme
@ -32,6 +32,14 @@ struct SettingsView: View {
var settings: some View {
#if os(macOS)
TabView(selection: $selection) {
Form {
LocationsSettings()
}
.tabItem {
Label("Locations", systemImage: "globe")
}
.tag(Tabs.locations)
Form {
BrowsingSettings()
}
@ -64,14 +72,6 @@ struct SettingsView: View {
}
.tag(Tabs.sponsorBlock)
Form {
LocationsSettings()
}
.tabItem {
Label("Locations", systemImage: "globe")
}
.tag(Tabs.locations)
Group {
AdvancedSettings()
}
@ -121,6 +121,12 @@ struct SettingsView: View {
}
#endif
NavigationLink {
LocationsSettings()
} label: {
Label("Locations", systemImage: "globe")
}
NavigationLink {
BrowsingSettings()
} label: {
@ -145,12 +151,6 @@ struct SettingsView: View {
Label("SponsorBlock", systemImage: "dollarsign.circle")
}
NavigationLink {
LocationsSettings()
} label: {
Label("Locations", systemImage: "globe")
}
NavigationLink {
AdvancedSettings()
} label: {