فهرست منبع

Merge pull request #173 from MikePlante1/adjustments

Tweaks for Adjustments UI
polscm32 1 سال پیش
والد
کامیت
f33a1c8371

+ 8 - 0
FreeAPS.xcodeproj/project.pbxproj

@@ -483,6 +483,8 @@
 		DD9ECB712CA9A0BA00AA7C45 /* RemoteControlConfigProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD9ECB6E2CA9A0BA00AA7C45 /* RemoteControlConfigProvider.swift */; };
 		DD9ECB712CA9A0BA00AA7C45 /* RemoteControlConfigProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD9ECB6E2CA9A0BA00AA7C45 /* RemoteControlConfigProvider.swift */; };
 		DD9ECB722CA9A0BA00AA7C45 /* RemoteControlConfigDataFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD9ECB6F2CA9A0BA00AA7C45 /* RemoteControlConfigDataFlow.swift */; };
 		DD9ECB722CA9A0BA00AA7C45 /* RemoteControlConfigDataFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD9ECB6F2CA9A0BA00AA7C45 /* RemoteControlConfigDataFlow.swift */; };
 		DD9ECB742CA9A0C300AA7C45 /* RemoteControlConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD9ECB732CA9A0C300AA7C45 /* RemoteControlConfig.swift */; };
 		DD9ECB742CA9A0C300AA7C45 /* RemoteControlConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD9ECB732CA9A0C300AA7C45 /* RemoteControlConfig.swift */; };
+		DDA6E3202D258E0500C2988C /* OverrideHelpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA6E31F2D258E0500C2988C /* OverrideHelpView.swift */; };
+		DDA6E3222D25901100C2988C /* TempTargetHelpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA6E3212D25901100C2988C /* TempTargetHelpView.swift */; };
 		DDA6E2502D22187500C2988C /* ChartLegendView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA6E24F2D22187500C2988C /* ChartLegendView.swift */; };
 		DDA6E2502D22187500C2988C /* ChartLegendView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA6E24F2D22187500C2988C /* ChartLegendView.swift */; };
 		DDB37CC52D05048F00D99BF4 /* ContactImageStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB37CC42D05048F00D99BF4 /* ContactImageStorage.swift */; };
 		DDB37CC52D05048F00D99BF4 /* ContactImageStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB37CC42D05048F00D99BF4 /* ContactImageStorage.swift */; };
 		DDB37CC72D05127500D99BF4 /* FontExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB37CC62D05127500D99BF4 /* FontExtensions.swift */; };
 		DDB37CC72D05127500D99BF4 /* FontExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB37CC62D05127500D99BF4 /* FontExtensions.swift */; };
@@ -1186,6 +1188,8 @@
 		DD9ECB6E2CA9A0BA00AA7C45 /* RemoteControlConfigProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemoteControlConfigProvider.swift; sourceTree = "<group>"; };
 		DD9ECB6E2CA9A0BA00AA7C45 /* RemoteControlConfigProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemoteControlConfigProvider.swift; sourceTree = "<group>"; };
 		DD9ECB6F2CA9A0BA00AA7C45 /* RemoteControlConfigDataFlow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemoteControlConfigDataFlow.swift; sourceTree = "<group>"; };
 		DD9ECB6F2CA9A0BA00AA7C45 /* RemoteControlConfigDataFlow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemoteControlConfigDataFlow.swift; sourceTree = "<group>"; };
 		DD9ECB732CA9A0C300AA7C45 /* RemoteControlConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemoteControlConfig.swift; sourceTree = "<group>"; };
 		DD9ECB732CA9A0C300AA7C45 /* RemoteControlConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemoteControlConfig.swift; sourceTree = "<group>"; };
+		DDA6E31F2D258E0500C2988C /* OverrideHelpView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OverrideHelpView.swift; sourceTree = "<group>"; };
+		DDA6E3212D25901100C2988C /* TempTargetHelpView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempTargetHelpView.swift; sourceTree = "<group>"; };
 		DDA6E24F2D22187500C2988C /* ChartLegendView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartLegendView.swift; sourceTree = "<group>"; };
 		DDA6E24F2D22187500C2988C /* ChartLegendView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartLegendView.swift; sourceTree = "<group>"; };
 		DDB37CC22D05044D00D99BF4 /* ContactTrickEntryStored+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ContactTrickEntryStored+CoreDataClass.swift"; sourceTree = "<group>"; };
 		DDB37CC22D05044D00D99BF4 /* ContactTrickEntryStored+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ContactTrickEntryStored+CoreDataClass.swift"; sourceTree = "<group>"; };
 		DDB37CC32D05044D00D99BF4 /* ContactTrickEntryStored+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ContactTrickEntryStored+CoreDataProperties.swift"; sourceTree = "<group>"; };
 		DDB37CC32D05044D00D99BF4 /* ContactTrickEntryStored+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ContactTrickEntryStored+CoreDataProperties.swift"; sourceTree = "<group>"; };
@@ -2484,6 +2488,7 @@
 		BD793CAD2CE7660C00D669AC /* Overrides */ = {
 		BD793CAD2CE7660C00D669AC /* Overrides */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				DDA6E31F2D258E0500C2988C /* OverrideHelpView.swift */,
 				DDD1631B2C4C697400CD525A /* AddOverrideForm.swift */,
 				DDD1631B2C4C697400CD525A /* AddOverrideForm.swift */,
 				DDD163192C4C695E00CD525A /* EditOverrideForm.swift */,
 				DDD163192C4C695E00CD525A /* EditOverrideForm.swift */,
 			);
 			);
@@ -2493,6 +2498,7 @@
 		BD793CAE2CE7661D00D669AC /* TempTargets */ = {
 		BD793CAE2CE7661D00D669AC /* TempTargets */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				DDA6E3212D25901100C2988C /* TempTargetHelpView.swift */,
 				58A3D5392C96D4DE003F90FC /* AddTempTargetForm.swift */,
 				58A3D5392C96D4DE003F90FC /* AddTempTargetForm.swift */,
 				5825A1BD2C97335C0046467E /* EditTempTargetForm.swift */,
 				5825A1BD2C97335C0046467E /* EditTempTargetForm.swift */,
 			);
 			);
@@ -3544,6 +3550,7 @@
 				DDD1631F2C4C6F6900CD525A /* TrioCoreDataPersistentContainer.xcdatamodeld in Sources */,
 				DDD1631F2C4C6F6900CD525A /* TrioCoreDataPersistentContainer.xcdatamodeld in Sources */,
 				DD1745482C55C61D00211FAC /* AutosensSettingsStateModel.swift in Sources */,
 				DD1745482C55C61D00211FAC /* AutosensSettingsStateModel.swift in Sources */,
 				DD1745462C55C61500211FAC /* AutosensSettingsProvider.swift in Sources */,
 				DD1745462C55C61500211FAC /* AutosensSettingsProvider.swift in Sources */,
+				DDA6E3202D258E0500C2988C /* OverrideHelpView.swift in Sources */,
 				DDA6E2502D22187500C2988C /* ChartLegendView.swift in Sources */,
 				DDA6E2502D22187500C2988C /* ChartLegendView.swift in Sources */,
 				3811DEAF25C9D88300A708ED /* KeyValueStorage.swift in Sources */,
 				3811DEAF25C9D88300A708ED /* KeyValueStorage.swift in Sources */,
 				DDD6D4D32CDE90720029439A /* HbA1cDisplayUnit.swift in Sources */,
 				DDD6D4D32CDE90720029439A /* HbA1cDisplayUnit.swift in Sources */,
@@ -3677,6 +3684,7 @@
 				CE1F6DDB2BAE08B60064EB8D /* TidepoolManager.swift in Sources */,
 				CE1F6DDB2BAE08B60064EB8D /* TidepoolManager.swift in Sources */,
 				BD2B464E0745FBE7B79913F4 /* NightscoutConfigProvider.swift in Sources */,
 				BD2B464E0745FBE7B79913F4 /* NightscoutConfigProvider.swift in Sources */,
 				9825E5E923F0B8FA80C8C7C7 /* NightscoutConfigStateModel.swift in Sources */,
 				9825E5E923F0B8FA80C8C7C7 /* NightscoutConfigStateModel.swift in Sources */,
+				DDA6E3222D25901100C2988C /* TempTargetHelpView.swift in Sources */,
 				58645B9D2CA2D275008AFCE7 /* DeterminationSetup.swift in Sources */,
 				58645B9D2CA2D275008AFCE7 /* DeterminationSetup.swift in Sources */,
 				DD1745442C55C60E00211FAC /* AutosensSettingsDataFlow.swift in Sources */,
 				DD1745442C55C60E00211FAC /* AutosensSettingsDataFlow.swift in Sources */,
 				BDCAF2382C639F35002DC907 /* SettingItems.swift in Sources */,
 				BDCAF2382C639F35002DC907 /* SettingItems.swift in Sources */,

+ 7 - 3
FreeAPS/Sources/Modules/Adjustments/View/AdjustmentsRootView.swift

@@ -419,6 +419,7 @@ extension Adjustments {
                     .background(.thinMaterial)
                     .background(.thinMaterial)
                     .opacity(0.8)
                     .opacity(0.8)
                     .clipShape(Rectangle())
                     .clipShape(Rectangle())
+
                 Group {
                 Group {
                     switch state.selectedTab {
                     switch state.selectedTab {
                     case .overrides:
                     case .overrides:
@@ -430,9 +431,10 @@ extension Adjustments {
                             }
                             }
                         }, label: {
                         }, label: {
                             Text("Stop Override")
                             Text("Stop Override")
+                                .frame(maxWidth: .infinity, maxHeight: .infinity)
                                 .padding(10)
                                 .padding(10)
                         })
                         })
-                            .frame(width: UIScreen.main.bounds.width * 0.9, alignment: .center)
+                            .frame(width: UIScreen.main.bounds.width * 0.9, height: 40, alignment: .center)
                             .disabled(!state.isEnabled)
                             .disabled(!state.isEnabled)
                             .background(!state.isEnabled ? Color(.systemGray4) : Color(.systemRed))
                             .background(!state.isEnabled ? Color(.systemGray4) : Color(.systemRed))
                             .tint(.white)
                             .tint(.white)
@@ -448,15 +450,17 @@ extension Adjustments {
                             }
                             }
                         }, label: {
                         }, label: {
                             Text("Stop Temp Target")
                             Text("Stop Temp Target")
+                                .frame(maxWidth: .infinity, maxHeight: .infinity)
                                 .padding(10)
                                 .padding(10)
                         })
                         })
-                            .frame(width: UIScreen.main.bounds.width * 0.9, alignment: .center)
+                            .frame(width: UIScreen.main.bounds.width * 0.9, height: 40, alignment: .center)
                             .disabled(!state.isTempTargetEnabled)
                             .disabled(!state.isTempTargetEnabled)
                             .background(!state.isTempTargetEnabled ? Color(.systemGray4) : Color(.systemRed))
                             .background(!state.isTempTargetEnabled ? Color(.systemGray4) : Color(.systemRed))
                             .tint(.white)
                             .tint(.white)
                             .clipShape(RoundedRectangle(cornerRadius: 8))
                             .clipShape(RoundedRectangle(cornerRadius: 8))
                     }
                     }
-                }.padding(5)
+                }
+                .padding(5)
             }
             }
         }
         }
 
 

+ 19 - 29
FreeAPS/Sources/Modules/Adjustments/View/Overrides/AddOverrideForm.swift

@@ -55,23 +55,7 @@ struct AddOverrideForm: View {
             }
             }
             .onAppear { targetStep = state.units == .mgdL ? 5 : 9 }
             .onAppear { targetStep = state.units == .mgdL ? 5 : 9 }
             .sheet(isPresented: $state.isHelpSheetPresented) {
             .sheet(isPresented: $state.isHelpSheetPresented) {
-                NavigationStack {
-                    List {
-                        Text("Lorem Ipsum Dolor Sit Amet")
-                    }
-                    .padding(.trailing, 10)
-                    .navigationBarTitle("Help", displayMode: .inline)
-
-                    Button { state.isHelpSheetPresented.toggle() }
-                    label: { Text("Got it!").frame(maxWidth: .infinity, alignment: .center) }
-                        .buttonStyle(.bordered)
-                        .padding(.top)
-                }
-                .padding()
-                .presentationDetents(
-                    [.fraction(0.9), .large],
-                    selection: $state.helpSheetDetent
-                )
+                OverrideHelpView(state: state, helpSheetDetent: $state.helpSheetDetent)
             }
             }
         }
         }
     }
     }
@@ -94,9 +78,9 @@ struct AddOverrideForm: View {
                     Spacer()
                     Spacer()
                     Text("\(state.overridePercentage.formatted(.number)) %")
                     Text("\(state.overridePercentage.formatted(.number)) %")
                         .foregroundColor(!displayPickerPercentage ? .primary : .accentColor)
                         .foregroundColor(!displayPickerPercentage ? .primary : .accentColor)
-                }
-                .onTapGesture {
-                    displayPickerPercentage = toggleScrollWheel(displayPickerPercentage)
+                        .onTapGesture {
+                            displayPickerPercentage = toggleScrollWheel(displayPickerPercentage)
+                        }
                 }
                 }
 
 
                 if displayPickerPercentage {
                 if displayPickerPercentage {
@@ -232,6 +216,9 @@ struct AddOverrideForm: View {
                                 state.convertTo12HourFormat(Int(truncating: state.start as NSNumber))
                                 state.convertTo12HourFormat(Int(truncating: state.start as NSNumber))
                         )
                         )
                         .foregroundColor(!displayPickerDisableSmbSchedule ? .primary : .accentColor)
                         .foregroundColor(!displayPickerDisableSmbSchedule ? .primary : .accentColor)
+                        .onTapGesture {
+                            displayPickerDisableSmbSchedule = toggleScrollWheel(displayPickerDisableSmbSchedule)
+                        }
                         Spacer()
                         Spacer()
                         Divider().frame(width: 1, height: 20)
                         Divider().frame(width: 1, height: 20)
                         Spacer()
                         Spacer()
@@ -242,11 +229,11 @@ struct AddOverrideForm: View {
                                 state.convertTo12HourFormat(Int(truncating: state.end as NSNumber))
                                 state.convertTo12HourFormat(Int(truncating: state.end as NSNumber))
                         )
                         )
                         .foregroundColor(!displayPickerDisableSmbSchedule ? .primary : .accentColor)
                         .foregroundColor(!displayPickerDisableSmbSchedule ? .primary : .accentColor)
+                        .onTapGesture {
+                            displayPickerDisableSmbSchedule = toggleScrollWheel(displayPickerDisableSmbSchedule)
+                        }
                         Spacer()
                         Spacer()
                     }
                     }
-                    .onTapGesture {
-                        displayPickerDisableSmbSchedule = toggleScrollWheel(displayPickerDisableSmbSchedule)
-                    }
 
 
                     if displayPickerDisableSmbSchedule {
                     if displayPickerDisableSmbSchedule {
                         HStack {
                         HStack {
@@ -301,6 +288,9 @@ struct AddOverrideForm: View {
                             Spacer()
                             Spacer()
                             Text("\(state.smbMinutes.formatted(.number)) min")
                             Text("\(state.smbMinutes.formatted(.number)) min")
                                 .foregroundColor(!displayPickerSmbMinutes ? .primary : .accentColor)
                                 .foregroundColor(!displayPickerSmbMinutes ? .primary : .accentColor)
+                                .onTapGesture {
+                                    displayPickerSmbMinutes = toggleScrollWheel(displayPickerSmbMinutes)
+                                }
                             Spacer()
                             Spacer()
                             Divider().frame(width: 1, height: 20)
                             Divider().frame(width: 1, height: 20)
                             Spacer()
                             Spacer()
@@ -308,9 +298,9 @@ struct AddOverrideForm: View {
                             Spacer()
                             Spacer()
                             Text("\(state.uamMinutes.formatted(.number)) min")
                             Text("\(state.uamMinutes.formatted(.number)) min")
                                 .foregroundColor(!displayPickerSmbMinutes ? .primary : .accentColor)
                                 .foregroundColor(!displayPickerSmbMinutes ? .primary : .accentColor)
-                        }
-                        .onTapGesture {
-                            displayPickerSmbMinutes = toggleScrollWheel(displayPickerSmbMinutes)
+                                .onTapGesture {
+                                    displayPickerSmbMinutes = toggleScrollWheel(displayPickerSmbMinutes)
+                                }
                         }
                         }
 
 
                         if displayPickerSmbMinutes {
                         if displayPickerSmbMinutes {
@@ -355,9 +345,9 @@ struct AddOverrideForm: View {
                         Spacer()
                         Spacer()
                         Text(state.formatHrMin(Int(state.overrideDuration)))
                         Text(state.formatHrMin(Int(state.overrideDuration)))
                             .foregroundColor(!displayPickerDuration ? .primary : .accentColor)
                             .foregroundColor(!displayPickerDuration ? .primary : .accentColor)
-                    }
-                    .onTapGesture {
-                        displayPickerDuration = toggleScrollWheel(displayPickerDuration)
+                            .onTapGesture {
+                                displayPickerDuration = toggleScrollWheel(displayPickerDuration)
+                            }
                     }
                     }
 
 
                     if displayPickerDuration {
                     if displayPickerDuration {

+ 19 - 29
FreeAPS/Sources/Modules/Adjustments/View/Overrides/EditOverrideForm.swift

@@ -117,23 +117,7 @@ struct EditOverrideForm: View {
                 }
                 }
             }
             }
             .sheet(isPresented: $state.isHelpSheetPresented) {
             .sheet(isPresented: $state.isHelpSheetPresented) {
-                NavigationStack {
-                    List {
-                        Text("Lorem Ipsum Dolor Sit Amet")
-                    }
-                    .padding(.trailing, 10)
-                    .navigationBarTitle("Help", displayMode: .inline)
-
-                    Button { state.isHelpSheetPresented.toggle() }
-                    label: { Text("Got it!").frame(maxWidth: .infinity, alignment: .center) }
-                        .buttonStyle(.bordered)
-                        .padding(.top)
-                }
-                .padding()
-                .presentationDetents(
-                    [.fraction(0.9), .large],
-                    selection: $state.helpSheetDetent
-                )
+                OverrideHelpView(state: state, helpSheetDetent: $state.helpSheetDetent)
             }
             }
         }
         }
     }
     }
@@ -160,9 +144,9 @@ struct EditOverrideForm: View {
                     Spacer()
                     Spacer()
                     Text("\(percentage.formatted(.number)) %")
                     Text("\(percentage.formatted(.number)) %")
                         .foregroundColor(!displayPickerPercentage ? .primary : .accentColor)
                         .foregroundColor(!displayPickerPercentage ? .primary : .accentColor)
-                }
-                .onTapGesture {
-                    displayPickerPercentage = toggleScrollWheel(displayPickerPercentage)
+                        .onTapGesture {
+                            displayPickerPercentage = toggleScrollWheel(displayPickerPercentage)
+                        }
                 }
                 }
 
 
                 if displayPickerPercentage {
                 if displayPickerPercentage {
@@ -302,6 +286,9 @@ struct EditOverrideForm: View {
                                 state.convertTo12HourFormat(Int(truncating: start! as NSNumber))
                                 state.convertTo12HourFormat(Int(truncating: start! as NSNumber))
                         )
                         )
                         .foregroundColor(!displayPickerDisableSmbSchedule ? .primary : .accentColor)
                         .foregroundColor(!displayPickerDisableSmbSchedule ? .primary : .accentColor)
+                        .onTapGesture {
+                            displayPickerDisableSmbSchedule = toggleScrollWheel(displayPickerDisableSmbSchedule)
+                        }
 
 
                         Spacer()
                         Spacer()
 
 
@@ -316,9 +303,9 @@ struct EditOverrideForm: View {
                                 state.convertTo12HourFormat(Int(truncating: end! as NSNumber))
                                 state.convertTo12HourFormat(Int(truncating: end! as NSNumber))
                         )
                         )
                         .foregroundColor(!displayPickerDisableSmbSchedule ? .primary : .accentColor)
                         .foregroundColor(!displayPickerDisableSmbSchedule ? .primary : .accentColor)
-                    }
-                    .onTapGesture {
-                        displayPickerDisableSmbSchedule = toggleScrollWheel(displayPickerDisableSmbSchedule)
+                        .onTapGesture {
+                            displayPickerDisableSmbSchedule = toggleScrollWheel(displayPickerDisableSmbSchedule)
+                        }
                     }
                     }
 
 
                     if displayPickerDisableSmbSchedule {
                     if displayPickerDisableSmbSchedule {
@@ -383,6 +370,9 @@ struct EditOverrideForm: View {
                             Spacer()
                             Spacer()
                             Text("\(smbMinutes?.formatted(.number) ?? "\(state.defaultSmbMinutes)") min")
                             Text("\(smbMinutes?.formatted(.number) ?? "\(state.defaultSmbMinutes)") min")
                                 .foregroundColor(!displayPickerSmbMinutes ? .primary : .accentColor)
                                 .foregroundColor(!displayPickerSmbMinutes ? .primary : .accentColor)
+                                .onTapGesture {
+                                    displayPickerSmbMinutes = toggleScrollWheel(displayPickerSmbMinutes)
+                                }
 
 
                             Spacer()
                             Spacer()
 
 
@@ -394,9 +384,9 @@ struct EditOverrideForm: View {
                             Spacer()
                             Spacer()
                             Text("\(uamMinutes?.formatted(.number) ?? "\(state.defaultUamMinutes)") min")
                             Text("\(uamMinutes?.formatted(.number) ?? "\(state.defaultUamMinutes)") min")
                                 .foregroundColor(!displayPickerSmbMinutes ? .primary : .accentColor)
                                 .foregroundColor(!displayPickerSmbMinutes ? .primary : .accentColor)
-                        }
-                        .onTapGesture {
-                            displayPickerSmbMinutes = toggleScrollWheel(displayPickerSmbMinutes)
+                                .onTapGesture {
+                                    displayPickerSmbMinutes = toggleScrollWheel(displayPickerSmbMinutes)
+                                }
                         }
                         }
 
 
                         if displayPickerSmbMinutes {
                         if displayPickerSmbMinutes {
@@ -452,9 +442,9 @@ struct EditOverrideForm: View {
                         Spacer()
                         Spacer()
                         Text(state.formatHrMin(Int(truncating: duration as NSNumber)))
                         Text(state.formatHrMin(Int(truncating: duration as NSNumber)))
                             .foregroundColor(!displayPickerDuration ? .primary : .accentColor)
                             .foregroundColor(!displayPickerDuration ? .primary : .accentColor)
-                    }
-                    .onTapGesture {
-                        displayPickerDuration = toggleScrollWheel(displayPickerDuration)
+                            .onTapGesture {
+                                displayPickerDuration = toggleScrollWheel(displayPickerDuration)
+                            }
                     }
                     }
 
 
                     if displayPickerDuration {
                     if displayPickerDuration {

+ 53 - 0
FreeAPS/Sources/Modules/Adjustments/View/Overrides/OverrideHelpView.swift

@@ -0,0 +1,53 @@
+import SwiftUI
+
+struct OverrideHelpView: View {
+    var state: Adjustments.StateModel
+    var helpSheetDetent: Binding<PresentationDetent>
+
+    var body: some View {
+        NavigationStack {
+            List {
+                VStack(alignment: .leading, spacing: 10) {
+                    VStack(alignment: .leading, spacing: 0) {
+                        Text(
+                            "This feature can be used to override these therapy settings for a chosen length of time:"
+                        )
+                        .fixedSize(horizontal: false, vertical: true)
+                        Text("• Basal Rate")
+                        Text("•  Insulin Sensitivity")
+                        Text("•  Carb Ratio")
+                        Text("• Glucose Target")
+                    }
+                    Text(
+                        "There are also options to override your Max SMB Minutes and Max UAM SMB Minutes, as well as to disable SMBs."
+                    )
+                    Text(
+                        "Select \"Start Override\" to immediately start using the Override, or select \"Save as Preset\" to be able to easily start the Override at a later time."
+                    )
+                    Text(
+                        "If an active override preset is edited, the changes will also apply to the currently running override. However, if you edit the currently running override directly, the preset stays unchanged."
+                    )
+                    Text(
+                        "If using Dynamic ISF (without Sigmoid), overriding your ISF will only adjust the limits of the ISF the algorithm is allowed to set."
+                    )
+                    Text(
+                        "If using Dynamic ISF (with Sigmoid), overriding your ISF will adjust the ISF used at your glucose target which extends to the ISF used at other glucose. Overriding your glucose target will change glucose level your ISF will be set to your profile ISF. Both of these can be combined in a single Override."
+                    )
+                }.listRowBackground(Color.gray.opacity(0.1))
+            }
+            .navigationBarTitle("Help", displayMode: .inline)
+
+            Button { state.isHelpSheetPresented.toggle() }
+            label: { Text("Got it!").frame(maxWidth: .infinity, alignment: .center) }
+                .buttonStyle(.bordered)
+                .padding(.top)
+        }
+
+        .padding()
+        .scrollContentBackground(.hidden)
+        .presentationDetents(
+            [.fraction(0.9), .large],
+            selection: helpSheetDetent
+        )
+    }
+}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 4 - 22
FreeAPS/Sources/Modules/Adjustments/View/TempTargets/AddTempTargetForm.swift


+ 16 - 3
FreeAPS/Sources/Modules/Adjustments/View/TempTargets/EditTempTargetForm.swift

@@ -73,10 +73,23 @@ struct EditTempTargetForm: View {
                         Text("Cancel")
                         Text("Cancel")
                     })
                     })
                 }
                 }
+                ToolbarItem(placement: .topBarTrailing) {
+                    Button(
+                        action: {
+                            state.isHelpSheetPresented.toggle()
+                        },
+                        label: {
+                            Image(systemName: "questionmark.circle")
+                        }
+                    )
+                }
             }
             }
             .onAppear {
             .onAppear {
                 if halfBasalTarget != state.settingHalfBasalTarget { tempTargetSensitivityAdjustmentType = .slider }
                 if halfBasalTarget != state.settingHalfBasalTarget { tempTargetSensitivityAdjustmentType = .slider }
             }
             }
+            .sheet(isPresented: $state.isHelpSheetPresented) {
+                TempTargetHelpView(state: state, helpSheetDetent: $state.helpSheetDetent)
+            }
         }
         }
     }
     }
 
 
@@ -221,9 +234,9 @@ struct EditTempTargetForm: View {
                         Spacer()
                         Spacer()
                         Text(state.formatHrMin(Int(duration)))
                         Text(state.formatHrMin(Int(duration)))
                             .foregroundColor(!displayPickerDuration ? (duration > 0 ? .primary : .secondary) : .accentColor)
                             .foregroundColor(!displayPickerDuration ? (duration > 0 ? .primary : .secondary) : .accentColor)
-                    }
-                    .onTapGesture {
-                        displayPickerDuration = toggleScrollWheel(displayPickerDuration)
+                            .onTapGesture {
+                                displayPickerDuration = toggleScrollWheel(displayPickerDuration)
+                            }
                     }
                     }
 
 
                     if displayPickerDuration {
                     if displayPickerDuration {

+ 39 - 0
FreeAPS/Sources/Modules/Adjustments/View/TempTargets/TempTargetHelpView.swift

@@ -0,0 +1,39 @@
+import SwiftUI
+
+struct TempTargetHelpView: View {
+    var state: Adjustments.StateModel
+    var helpSheetDetent: Binding<PresentationDetent>
+
+    var body: some View {
+        NavigationStack {
+            List {
+                VStack(alignment: .leading, spacing: 10) {
+                    Text(
+                        "A Temporary Target replaces the current Target Glucose specified in Therapy settings."
+                    )
+                    Text(
+                        "Depending on your Target Behavior settings (see Settings > the Algorithm > Target Behavior), these temporary glucose targets can also raise Insulin Sensitivity for high targets or lower sensitivity for low targets."
+                    )
+                    Text(
+                        "Furthermore, you could adjust that sensitivity change independently from the Half Basal Exercise Target specified in Algorithm > Target Behavior settings by deliberatly setting a customized Insulin Percentage for a Temp Target."
+                    )
+                    Text(
+                        "A pre-condition to have Temp Targets adjust Sensitivity is that the respective Target Behavior settings High Temp Target Raises Sensitivity or Low Temp Target Lowers Sensitivity are set to enabled."
+                    )
+                }.listRowBackground(Color.gray.opacity(0.1))
+            }
+            .navigationBarTitle("Help", displayMode: .inline)
+
+            Button { state.isHelpSheetPresented.toggle() }
+            label: { Text("Got it!").frame(maxWidth: .infinity, alignment: .center) }
+                .buttonStyle(.bordered)
+                .padding(.top)
+        }
+        .padding()
+        .scrollContentBackground(.hidden)
+        .presentationDetents(
+            [.fraction(0.9), .large],
+            selection: helpSheetDetent
+        )
+    }
+}

+ 3 - 3
FreeAPS/Sources/Modules/Adjustments/View/ViewElements/TargetPicker.swift

@@ -18,9 +18,9 @@ struct TargetPicker: View {
                 (units == .mgdL ? selection.description : selection.formattedAsMmolL) + " " + units.rawValue
                 (units == .mgdL ? selection.description : selection.formattedAsMmolL) + " " + units.rawValue
             )
             )
             .foregroundColor(!displayPickerTarget ? .primary : .accentColor)
             .foregroundColor(!displayPickerTarget ? .primary : .accentColor)
-        }
-        .onTapGesture {
-            displayPickerTarget = toggleScrollWheel(displayPickerTarget)
+            .onTapGesture {
+                displayPickerTarget = toggleScrollWheel(displayPickerTarget)
+            }
         }
         }
         if displayPickerTarget {
         if displayPickerTarget {
             HStack {
             HStack {

+ 1 - 0
FreeAPS/Sources/Modules/PumpConfig/View/PumpConfigRootView.swift

@@ -68,6 +68,7 @@ extension PumpConfig {
                                                                 Text("• Medtronic")
                                                                 Text("• Medtronic")
                                                                 Text("• Omnipod Eros")
                                                                 Text("• Omnipod Eros")
                                                                 Text("• Omnipod Dash")
                                                                 Text("• Omnipod Dash")
+                                                                Text("• Dana (RS/-i)")
                                                                 Text("• Pump Simulator")
                                                                 Text("• Pump Simulator")
                                                             }
                                                             }
                                                             Text(
                                                             Text(

+ 2 - 2
Trio.xcworkspace/xcshareddata/swiftpm/Package.resolved

@@ -1,5 +1,5 @@
 {
 {
-  "originHash" : "59ac7eba66375d6eb406e758cb0b9964f4b3b0ae45c5665596f00384c32262b9",
+  "originHash" : "52d77fc35af7fe71614051dee0b291e2a0d38522eac7ae4d37d2442e81c7530c",
   "pins" : [
   "pins" : [
     {
     {
       "identity" : "cryptoswift",
       "identity" : "cryptoswift",
@@ -49,7 +49,7 @@
     {
     {
       "identity" : "swiftcharts",
       "identity" : "swiftcharts",
       "kind" : "remoteSourceControl",
       "kind" : "remoteSourceControl",
-      "location" : "https://github.com/ivanschuetz/SwiftCharts",
+      "location" : "https://github.com/ivanschuetz/SwiftCharts.git",
       "state" : {
       "state" : {
         "branch" : "master",
         "branch" : "master",
         "revision" : "c354c1945bb35a1f01b665b22474f6db28cba4a2"
         "revision" : "c354c1945bb35a1f01b665b22474f6db28cba4a2"