| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- //
- // FeatureSettingsView.swift
- // FreeAPS
- //
- // Created by Deniz Cengiz on 26.07.24.
- //
- import Foundation
- import SwiftUI
- import Swinject
- struct TherapySettingsView: BaseView {
- let resolver: Resolver
- @ObservedObject var state: Settings.StateModel
- @Environment(\.colorScheme) var colorScheme
- var color: LinearGradient {
- colorScheme == .dark ? LinearGradient(
- gradient: Gradient(colors: [
- Color.bgDarkBlue,
- Color.bgDarkerDarkBlue
- ]),
- startPoint: .top,
- endPoint: .bottom
- )
- :
- LinearGradient(
- gradient: Gradient(colors: [Color.gray.opacity(0.1)]),
- startPoint: .top,
- endPoint: .bottom
- )
- }
- var body: some View {
- Form {
- Section(
- header: Text("Basic Insulin Rates & Targets"),
- content: {
- Text("Basal Rates").navigationLink(to: .basalProfileEditor, from: self)
- Text("Insulin Sensitivities").navigationLink(to: .isfEditor, from: self)
- Text("Carb Ratios").navigationLink(to: .crEditor, from: self)
- Text("Target Glucose").navigationLink(to: .targetsEditor, from: self)
- }
- )
- .listRowBackground(Color.chart)
- Section(
- header: Text("Data-Driven Settings Tuning"),
- content: {
- Text("Autotune").navigationLink(to: .autotuneConfig, from: self)
- }
- )
- .listRowBackground(Color.chart)
- }
- .scrollContentBackground(.hidden).background(color)
- .navigationTitle("Therapy Settings")
- .navigationBarTitleDisplayMode(.automatic)
- }
- }
|