| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- //
- // DexcomSettingsView.swift
- // LoopFollow
- //
- // Created by Jonas Björkert on 2025-01-18.
- // Copyright © 2025 Jon Fawcett. All rights reserved.
- //
- import SwiftUI
- struct DexcomSettingsView: View {
- @ObservedObject var viewModel: DexcomSettingsViewModel
- @Environment(\.presentationMode) var presentationMode
- var body: some View {
- NavigationView {
- Form {
- Section(header: Text("Dexcom Settings")) {
- TextField("User Name", text: $viewModel.userName)
- .autocapitalization(.none)
- .disableAutocorrection(true)
- TextField("Password", text: $viewModel.password)
- .autocapitalization(.none)
- .disableAutocorrection(true)
- Picker("Server", selection: $viewModel.server) {
- Text("US").tag("US")
- Text("NON-US").tag("NON-US")
- }
- .pickerStyle(SegmentedPickerStyle())
- }
- }
- .navigationBarTitle("Dexcom Settings", displayMode: .inline)
- .toolbar {
- ToolbarItem(placement: .navigationBarTrailing) {
- Button("Done") {
- presentationMode.wrappedValue.dismiss()
- }
- }
- }
- }
- }
- }
|