// // FeatureSettingsView.swift // FreeAPS // // Created by Deniz Cengiz on 26.07.24. // import Foundation import HealthKit import SwiftUI import Swinject struct ServicesView: 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("Connected Services"), content: { Text("Nightscout").navigationLink(to: .nighscoutConfig, from: self) NavigationLink(destination: TidepoolStartView(state: state)) { Text("Tidepool") } if HKHealthStore.isHealthDataAvailable() { Text("Apple Health").navigationLink(to: .healthkit, from: self) } } ) .listRowBackground(Color.chart) } .scrollContentBackground(.hidden).background(color) .navigationTitle("Services") .navigationBarTitleDisplayMode(.automatic) } }