DevicesView.swift 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 DevicesView: 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("Setup & Configuraton"),
  19. content: {
  20. Text("Insulin Pump").navigationLink(to: .pumpConfig, from: self)
  21. Text("Continuous Glucose Monitor").navigationLink(to: .cgm, from: self)
  22. Text("Smart Watch").navigationLink(to: .watch, from: self)
  23. }
  24. )
  25. .listRowBackground(Color.chart)
  26. }
  27. .scrollContentBackground(.hidden)
  28. .background(appState.trioBackgroundColor(for: colorScheme))
  29. .navigationTitle("Devices")
  30. .navigationBarTitleDisplayMode(.automatic)
  31. }
  32. }