TherapySettingsView.swift 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // FeatureSettingsView.swift
  3. // FreeAPS
  4. //
  5. // Created by Deniz Cengiz on 26.07.24.
  6. //
  7. import Foundation
  8. import SwiftUI
  9. import Swinject
  10. struct TherapySettingsView: BaseView {
  11. let resolver: Resolver
  12. @ObservedObject var state: Settings.StateModel
  13. @Environment(\.colorScheme) var colorScheme
  14. @Environment(AppState.self) var appState
  15. var body: some View {
  16. Form {
  17. Section(
  18. header: Text("Basic Settings"),
  19. content: {
  20. Text("Units and Limits").navigationLink(to: .unitsAndLimits, from: self)
  21. }
  22. )
  23. .listRowBackground(Color.chart)
  24. Section(
  25. header: Text("Basic Insulin Rates & Targets"),
  26. content: {
  27. Text("Basal Rates").navigationLink(to: .basalProfileEditor, from: self)
  28. Text("Insulin Sensitivities").navigationLink(to: .isfEditor, from: self)
  29. Text("Carb Ratios").navigationLink(to: .crEditor, from: self)
  30. Text("Glucose Targets").navigationLink(to: .targetsEditor, from: self)
  31. }
  32. )
  33. .listRowBackground(Color.chart)
  34. }
  35. .scrollContentBackground(.hidden)
  36. .background(appState.trioBackgroundColor(for: colorScheme))
  37. .navigationTitle("Therapy Settings")
  38. .navigationBarTitleDisplayMode(.automatic)
  39. }
  40. }