SettingsRootView.swift 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. }
  26. Section(header: Text("Services")) {
  27. Text("Nightscout").chevronCell().modal(for: .nighscoutConfig, from: self)
  28. }
  29. Section(header: Text("Devices")) {
  30. Text("Pump").chevronCell().modal(for: .pumpConfig, from: self)
  31. }
  32. }
  33. .navigationTitle("Settings")
  34. .navigationBarTitleDisplayMode(.automatic)
  35. }
  36. }
  37. }