summaryrefslogtreecommitdiff
path: root/Sora/Views/Settings/SettingsView.swift
blob: 814a3036ae3c90f4b54e2163653b84946f231732 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import SwiftUI

struct SettingsView: View {
  var body: some View {
    NavigationStack {
      Form {
        Section(header: Text("Appearance and Behavior")) {
          NavigationLink(destination: SettingsSectionProviderView()) {
            Text("Provider Settings")
          }

          NavigationLink(destination: SettingsSectionThumbnailsView()) {
            Text("Thumbnail Settings")
          }

          NavigationLink(destination: SettingsSectionDetailsView()) {
            Text("Details Settings")
          }
        }

        Section(header: Text("Search")) {
          SettingsSectionSearchView()
        }

        Section(header: Text("Collections")) {
          NavigationLink(destination: SettingsCollectionsListView()) {
            Text("Manage Collections")
          }
        }

        Section(header: Text("Settings")) {
          SettingsSectionSettingsView()
        }

        Section(header: Text("Import and Export")) {
          SettingsSectionImportExportView()
        }

        #if DEBUG
          Section(header: Text("Debug")) {
            SettingsSectionDebugView()
          }
        #endif

        Section(header: Text("Credits")) {
          SettingsSectionCreditsView()
        }
      }
      #if os(macOS)
        .formStyle(.grouped)
      #endif
      .navigationTitle("Settings")
    }
  }
}

#Preview {
  SettingsView()
    .environmentObject(SettingsManager())
    .environmentObject(BooruManager(.yandere))
}