SettingsRootView.swift 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import SwiftUI
  2. extension Settings {
  3. struct RootView: BaseView {
  4. @EnvironmentObject var viewModel: ViewModel<Provider>
  5. var body: some View {
  6. Form {
  7. Section(header: Text("Config files")) {
  8. Group {
  9. Text("Preferences").chevronCell()
  10. .modal(for: .configEditor(file: OpenAPS.Settings.preferences), from: self)
  11. Text("Pump Settings").chevronCell().modal(for: .configEditor(file: OpenAPS.Settings.settings), from: self)
  12. Text("Autosense").chevronCell().modal(for: .configEditor(file: OpenAPS.Settings.autosense), from: self)
  13. Text("Pump History").chevronCell()
  14. .modal(for: .configEditor(file: OpenAPS.Monitor.pumpHistory), from: self)
  15. Text("Basal profile").chevronCell()
  16. .modal(for: .configEditor(file: OpenAPS.Settings.basalProfile), from: self)
  17. Text("BG targets").chevronCell().modal(for: .configEditor(file: OpenAPS.Settings.bgTargets), from: self)
  18. Text("Carb ratios").chevronCell().modal(for: .configEditor(file: OpenAPS.Settings.carbRatios), from: self)
  19. Text("Insulin sensitivities").chevronCell()
  20. .modal(for: .configEditor(file: OpenAPS.Settings.carbRatios), from: self)
  21. }
  22. Text("Temp targets").chevronCell().modal(for: .configEditor(file: OpenAPS.Settings.tempTargets), from: self)
  23. Text("Pump profile").chevronCell().modal(for: .configEditor(file: OpenAPS.Settings.pumpProfile), from: self)
  24. Text("Profile").chevronCell().modal(for: .configEditor(file: OpenAPS.Settings.profile), from: self)
  25. Text("Glucose").chevronCell().modal(for: .configEditor(file: OpenAPS.Monitor.glucose), from: self)
  26. Text("Meal").chevronCell().modal(for: .configEditor(file: OpenAPS.Monitor.meal), from: self)
  27. }
  28. Section(header: Text("Services")) {
  29. Text("Nightscout").chevronCell().modal(for: .nighscoutConfig, from: self)
  30. }
  31. Section(header: Text("Devices")) {
  32. Text("Pump").chevronCell().modal(for: .pumpConfig, from: self)
  33. }
  34. }
  35. .navigationTitle("Settings")
  36. .navigationBarTitleDisplayMode(.automatic)
  37. }
  38. }
  39. }