Parcourir la source

confirmation dialog instead of alert

Robert il y a 1 an
Parent
commit
2eaa569349

+ 1 - 1
Trio/Sources/Localizations/Main/Localizable.xcstrings

@@ -156987,7 +156987,7 @@
         }
         }
       }
       }
     },
     },
-    "This feature cannot be enabled unless Autosens Max > 100%." : {
+    "This feature cannot be enabled unless Algorithm Settings > AutoSens > Autosens Max is set higher than 100%." : {
 
 
     },
     },
     "This feature ensures more accurate insulin adjustments when carb entries are missing or incorrect." : {
     "This feature ensures more accurate insulin adjustments when carb entries are missing or incorrect." : {

+ 8 - 4
Trio/Sources/Modules/TargetBehavoir/View/TargetBehavoirRootView.swift

@@ -187,14 +187,18 @@ extension TargetBehavoir {
             }
             }
             .scrollContentBackground(.hidden).background(appState.trioBackgroundColor(for: colorScheme))
             .scrollContentBackground(.hidden).background(appState.trioBackgroundColor(for: colorScheme))
             .onAppear(perform: configureView)
             .onAppear(perform: configureView)
-            .alert(
+            .confirmationDialog(
                 "Cannot Enable This Setting",
                 "Cannot Enable This Setting",
-                isPresented: $showAutosensMaxAlert
+                isPresented: $showAutosensMaxAlert,
+                titleVisibility: .visible
             ) {
             ) {
-                // Alert button(s). For a single button:
+                // Actions that appear in the dialog
                 Button("Got it!", role: .cancel) {}
                 Button("Got it!", role: .cancel) {}
+                    .foregroundColor(Color.tabBar)
             } message: {
             } message: {
-                Text("This feature cannot be enabled unless Autosens Max > 100%.")
+                Text(
+                    "This feature cannot be enabled unless Algorithm Settings > AutoSens > Autosens Max is set higher than 100%."
+                )
             }
             }
             .navigationTitle("Target Behavior")
             .navigationTitle("Target Behavior")
             .navigationBarTitleDisplayMode(.automatic)
             .navigationBarTitleDisplayMode(.automatic)