DexcomSettingsView.swift 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. // LoopFollow
  2. // DexcomSettingsView.swift
  3. // Created by Jonas Björkert on 2025-05-23.
  4. import SwiftUI
  5. struct DexcomSettingsView: View {
  6. @ObservedObject var viewModel: DexcomSettingsViewModel
  7. var body: some View {
  8. NavigationView {
  9. Form {
  10. Section(header: Text("Dexcom Settings")) {
  11. TextField("User Name", text: $viewModel.userName)
  12. .autocapitalization(.none)
  13. .disableAutocorrection(true)
  14. TextField("Password", text: $viewModel.password)
  15. .autocapitalization(.none)
  16. .disableAutocorrection(true)
  17. Picker("Server", selection: $viewModel.server) {
  18. Text("US").tag("US")
  19. Text("NON-US").tag("NON-US")
  20. }
  21. .pickerStyle(SegmentedPickerStyle())
  22. }
  23. }
  24. }
  25. .preferredColorScheme(Storage.shared.forceDarkMode.value ? .dark : nil)
  26. .navigationBarTitle("Dexcom Settings", displayMode: .inline)
  27. }
  28. }