FeatureSettingsView.swift 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 FeatureSettingsView: 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("Trio Features"),
  19. content: {
  20. Text("Bolus Calculator").navigationLink(to: .bolusCalculatorConfig, from: self)
  21. Text("Meal Settings").navigationLink(to: .mealSettings, from: self)
  22. Text("Shortcuts").navigationLink(to: .shortcutsConfig, from: self)
  23. Text("Remote Control").navigationLink(to: .remoteControlConfig, from: self)
  24. }
  25. )
  26. .listRowBackground(Color.chart)
  27. Section(
  28. header: Text("Trio Personalization"),
  29. content: {
  30. Text("User Interface").navigationLink(to: .userInterfaceSettings, from: self)
  31. Text("App Icons").navigationLink(to: .iconConfig, from: self)
  32. }
  33. )
  34. .listRowBackground(Color.chart)
  35. }
  36. .scrollContentBackground(.hidden)
  37. .background(appState.trioBackgroundColor(for: colorScheme))
  38. .navigationTitle("Feature Settings")
  39. .navigationBarTitleDisplayMode(.automatic)
  40. }
  41. }