blob: ab92a420e6d45109aa0a1b1b479fd2e34b4834c5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
import SwiftUI
struct SettingsView: View {
@EnvironmentObject var settings: Settings
var body: some View {
Form {
Section(header: Text("Provider")) {
SettingsProviderView()
}
Section(header: Text("Thumbnails")) {
SettingsThumbnailsView()
}
Section(header: Text("Details")) {
SettingsDetailsView()
}
Section(header: Text("Search")) {
SettingsSearchView()
}
Section(header: Text("Settings")) {
Button("Reset to Defaults") {
settings.resetToDefaults()
}
}
Section(header: Text("Attributions")) {
SettingsAttributionsView()
}
}
#if os(macOS)
.formStyle(.grouped)
#endif
.navigationTitle("Settings")
}
}
#Preview {
SettingsView()
.environmentObject(Settings())
}
|