FeatureSettingsView.swift 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. var color: LinearGradient {
  15. colorScheme == .dark ? LinearGradient(
  16. gradient: Gradient(colors: [
  17. Color.bgDarkBlue,
  18. Color.bgDarkerDarkBlue
  19. ]),
  20. startPoint: .top,
  21. endPoint: .bottom
  22. )
  23. :
  24. LinearGradient(
  25. gradient: Gradient(colors: [Color.gray.opacity(0.1)]),
  26. startPoint: .top,
  27. endPoint: .bottom
  28. )
  29. }
  30. var body: some View {
  31. Form {
  32. Section(
  33. header: Text("Oref Algorithm"),
  34. content: {
  35. Text("Preferences (to be omitted").navigationLink(to: .preferencesEditor, from: self)
  36. Text("Autosens Settings")
  37. Text("Super-Micro-Bolus (SMB) Settings")
  38. Text("Dynamic Settings").navigationLink(to: .dynamicISF, from: self)
  39. }
  40. ).listRowBackground(Color.chart)
  41. Section(
  42. header: Text("Trio Personalization"),
  43. content: {
  44. Text("Bolus Calculator").navigationLink(to: .bolusCalculatorConfig, from: self)
  45. Text("Meal Settings").navigationLink(to: .fpuConfig, from: self)
  46. Text("Shortcuts").navigationLink(to: .shortcutsConfig, from: self)
  47. Text("UI/UX").navigationLink(to: .statisticsConfig, from: self)
  48. Text("TODO: Move App Icons into UI/UX 👆")
  49. Text("App Icons").navigationLink(to: .iconConfig, from: self)
  50. }
  51. )
  52. .listRowBackground(Color.chart)
  53. }
  54. .scrollContentBackground(.hidden).background(color)
  55. .navigationTitle("Feature Settings")
  56. .navigationBarTitleDisplayMode(.automatic)
  57. }
  58. }