Просмотр исходного кода

Merge pull request #1 from dnzxy/settings-update

Extent SettingsInputSection and associated views
tmhastings 1 год назад
Родитель
Сommit
f2e374dcdb
29 измененных файлов с 436 добавлено и 310 удалено
  1. 67 47
      FreeAPS/Sources/Modules/AlgorithmAdvancedSettings/View/AlgorithmAdvancedSettingsRootView.swift
  2. 18 18
      FreeAPS/Sources/Modules/AutosensSettings/View/AutosensSettingsRootView.swift
  3. 6 6
      FreeAPS/Sources/Modules/AutotuneConfig/View/AutotuneConfigRootView.swift
  4. 14 10
      FreeAPS/Sources/Modules/BolusCalculatorConfig/View/BolusCalculatorConfigRootView.swift
  5. 11 6
      FreeAPS/Sources/Modules/CGM/View/CGMRootView.swift
  6. 8 8
      FreeAPS/Sources/Modules/CalendarEventSettings/View/CalendarEventSettingsRootView.swift
  7. 18 18
      FreeAPS/Sources/Modules/DynamicSettings/View/DynamicSettingsRootView.swift
  8. 18 14
      FreeAPS/Sources/Modules/GeneralSettings/View/UnitsLimitsSettingsRootView.swift
  9. 13 11
      FreeAPS/Sources/Modules/GlucoseNotificationSettings/View/GlucoseNotificationSettingsRootView.swift
  10. 8 6
      FreeAPS/Sources/Modules/HealthKit/View/AppleHealthKitRootView.swift
  11. 13 5
      FreeAPS/Sources/Modules/Home/View/HomeRootView.swift
  12. 11 5
      FreeAPS/Sources/Modules/LiveActivitySettings/View/LiveActivitySettingsRootView.swift
  13. 22 13
      FreeAPS/Sources/Modules/MealSettings/View/MealSettingsRootView.swift
  14. 8 5
      FreeAPS/Sources/Modules/NightscoutConfig/View/NightscoutConfigRootView.swift
  15. 16 6
      FreeAPS/Sources/Modules/NightscoutConfig/View/NightscoutFetchView.swift
  16. 8 6
      FreeAPS/Sources/Modules/NightscoutConfig/View/NightscoutUploadView.swift
  17. 4 4
      FreeAPS/Sources/Modules/NightscoutConfig/View/ProfileImport/ReviewInsulinActionView.swift
  18. 3 4
      FreeAPS/Sources/Modules/PumpConfig/View/PumpConfigRootView.swift
  19. 74 50
      FreeAPS/Sources/Modules/SMBSettings/View/SMBSettingsRootView.swift
  20. 11 4
      FreeAPS/Sources/Modules/Settings/View/SettingsRootView.swift
  21. 3 1
      FreeAPS/Sources/Modules/Settings/View/TidepoolStartView.swift
  22. 4 4
      FreeAPS/Sources/Modules/ShortcutsConfig/View/ShortcutsConfigView.swift
  23. 32 22
      FreeAPS/Sources/Modules/TargetBehavoir/View/TargetBehavoirRootView.swift
  24. 27 18
      FreeAPS/Sources/Modules/UserInterfaceSettings/View/UserInterfaceSettingsRootView.swift
  25. 7 7
      FreeAPS/Sources/Modules/WatchConfig/View/WatchConfigAppleWatchView.swift
  26. 3 3
      FreeAPS/Sources/Modules/WatchConfig/View/WatchConfigGarminView.swift
  27. 3 3
      FreeAPS/Sources/Views/DefinitionRow.swift
  28. 2 2
      FreeAPS/Sources/Views/SettingInputHintView.swift
  29. 4 4
      FreeAPS/Sources/Views/SettingInputSection.swift

+ 67 - 47
FreeAPS/Sources/Modules/AlgorithmAdvancedSettings/View/AlgorithmAdvancedSettingsRootView.swift

@@ -7,7 +7,7 @@ extension AlgorithmAdvancedSettings {
         @State var state = StateModel()
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -53,7 +53,7 @@ extension AlgorithmAdvancedSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Max Daily Safety Multiplier", comment: "Max Daily Safety Multiplier")
                         }
                     ),
@@ -61,9 +61,11 @@ extension AlgorithmAdvancedSettings {
                     type: .decimal("maxDailySafetyMultiplier"),
                     label: NSLocalizedString("Max Daily Safety Multiplier", comment: "Max Daily Safety Multiplier"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "This is an important OpenAPS safety limit. The default setting (which is unlikely to need adjusting) is 3. This means that OpenAPS will never be allowed to set a temporary basal rate that is more than 3x the highest hourly basal rate programmed in a user’s pump, or, if enabled, determined by autotune.",
-                        comment: "Max Daily Safety Multiplier"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "This is an important OpenAPS safety limit. The default setting (which is unlikely to need adjusting) is 3. This means that OpenAPS will never be allowed to set a temporary basal rate that is more than 3x the highest hourly basal rate programmed in a user’s pump, or, if enabled, determined by autotune.",
+                            comment: "Max Daily Safety Multiplier"
+                        )
                     )
                 )
 
@@ -74,7 +76,7 @@ extension AlgorithmAdvancedSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString(
                                 "Current Basal Safety Multiplier",
                                 comment: "Current Basal Safety Multiplier"
@@ -85,9 +87,11 @@ extension AlgorithmAdvancedSettings {
                     type: .decimal("currentBasalSafetyMultiplier"),
                     label: NSLocalizedString("Current Basal Safety Multiplier", comment: "Current Basal Safety Multiplier"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "This is another important OpenAPS safety limit. The default setting (which is also unlikely to need adjusting) is 4. This means that OpenAPS will never be allowed to set a temporary basal rate that is more than 4x the current hourly basal rate programmed in a user’s pump, or, if enabled, determined by autotune.",
-                        comment: "Current Basal Safety Multiplier"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "This is another important OpenAPS safety limit. The default setting (which is also unlikely to need adjusting) is 4. This means that OpenAPS will never be allowed to set a temporary basal rate that is more than 4x the current hourly basal rate programmed in a user’s pump, or, if enabled, determined by autotune.",
+                            comment: "Current Basal Safety Multiplier"
+                        )
                     )
                 )
 
@@ -98,7 +102,7 @@ extension AlgorithmAdvancedSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Duration of Insulin Action"
                         }
                     ),
@@ -106,7 +110,7 @@ extension AlgorithmAdvancedSettings {
                     type: .decimal("dia"),
                     label: "Duration of Insulin Action",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Duration of Insulin Action… bla bla bla"
+                    verboseHint: Text("Duration of Insulin Action… bla bla bla")
                 )
 
                 SettingInputSection(
@@ -116,7 +120,7 @@ extension AlgorithmAdvancedSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Use Custom Peak Time", comment: "Use Custom Peak Time")
                         }
                     ),
@@ -125,12 +129,12 @@ extension AlgorithmAdvancedSettings {
                     label: NSLocalizedString("Use Custom Peak Time", comment: "Use Custom Peak Time"),
                     conditionalLabel: NSLocalizedString("Insulin Peak Time", comment: "Insulin Peak Time"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
+                    verboseHint: Text(NSLocalizedString(
                         "Defaults to false. Setting to true allows changing insulinPeakTime", comment: "Use Custom Peak Time"
                     ) + NSLocalizedString(
                         "Time of maximum blood glucose lowering effect of insulin, in minutes. Beware: Oref assumes for ultra-rapid (Lyumjev) & rapid-acting (Fiasp) curves minimal (35 & 50 min) and maximal (100 & 120 min) applicable insulinPeakTimes. Using a custom insulinPeakTime outside these bounds will result in issues with Trio, longer loop calculations and possible red loops.",
                         comment: "Insulin Peak Time"
-                    )
+                    ))
                 )
 
                 SettingInputSection(
@@ -140,7 +144,7 @@ extension AlgorithmAdvancedSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Skip Neutral Temps", comment: "Skip Neutral Temps")
                         }
                     ),
@@ -148,9 +152,11 @@ extension AlgorithmAdvancedSettings {
                     type: .boolean,
                     label: NSLocalizedString("Skip Neutral Temps", comment: "Skip Neutral Temps"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "Defaults to false, so that Trio will set temps whenever it can, so it will be easier to see if the system is working, even when you are offline. This means Trio will set a “neutral” temp (same as your default basal) if no adjustments are needed. This is an old setting for OpenAPS to have the options to minimise sounds and notifications from the 'rig', that may wake you up during the night.",
-                        comment: "Skip Neutral Temps"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "Defaults to false, so that Trio will set temps whenever it can, so it will be easier to see if the system is working, even when you are offline. This means Trio will set a “neutral” temp (same as your default basal) if no adjustments are needed. This is an old setting for OpenAPS to have the options to minimise sounds and notifications from the 'rig', that may wake you up during the night.",
+                            comment: "Skip Neutral Temps"
+                        )
                     )
                 )
 
@@ -161,7 +167,7 @@ extension AlgorithmAdvancedSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Unsuspend If No Temp", comment: "Unsuspend If No Temp")
                         }
                     ),
@@ -169,9 +175,11 @@ extension AlgorithmAdvancedSettings {
                     type: .boolean,
                     label: NSLocalizedString("Unsuspend If No Temp", comment: "Unsuspend If No Temp"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "Many people occasionally forget to resume / unsuspend their pump after reconnecting it. If you’re one of them, and you are willing to reliably set a zero temp basal whenever suspending and disconnecting your pump, this feature has your back. If enabled, it will automatically resume / unsuspend the pump if you forget to do so before your zero temp expires. As long as the zero temp is still running, it will leave the pump suspended.",
-                        comment: "Unsuspend If No Temp"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "Many people occasionally forget to resume / unsuspend their pump after reconnecting it. If you’re one of them, and you are willing to reliably set a zero temp basal whenever suspending and disconnecting your pump, this feature has your back. If enabled, it will automatically resume / unsuspend the pump if you forget to do so before your zero temp expires. As long as the zero temp is still running, it will leave the pump suspended.",
+                            comment: "Unsuspend If No Temp"
+                        )
                     )
                 )
 
@@ -182,7 +190,7 @@ extension AlgorithmAdvancedSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Suspend Zeros IOB", comment: "Suspend Zeros IOB")
                         }
                     ),
@@ -190,9 +198,11 @@ extension AlgorithmAdvancedSettings {
                     type: .boolean,
                     label: NSLocalizedString("Suspend Zeros IOB", comment: "Suspend Zeros IOB"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "Default is false. Any existing temp basals during times the pump was suspended will be deleted and 0 temp basals to negate the profile basal rates during times pump is suspended will be added.",
-                        comment: "Suspend Zeros IOB"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "Default is false. Any existing temp basals during times the pump was suspended will be deleted and 0 temp basals to negate the profile basal rates during times pump is suspended will be added.",
+                            comment: "Suspend Zeros IOB"
+                        )
                     )
                 )
 
@@ -203,7 +213,7 @@ extension AlgorithmAdvancedSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString(
                                 "Autotune ISF Adjustment Fraction",
                                 comment: "Autotune ISF Adjustment Fraction"
@@ -214,9 +224,11 @@ extension AlgorithmAdvancedSettings {
                     type: .decimal("autotuneISFAdjustmentFraction"),
                     label: NSLocalizedString("Autotune ISF Adjustment Fraction", comment: "Autotune ISF Adjustment Fraction"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "The default of 0.5 for this value keeps autotune ISF closer to pump ISF via a weighted average of fullNewISF and pumpISF. 1.0 allows full adjustment, 0 is no adjustment from pump ISF.",
-                        comment: "Autotune ISF Adjustment Fraction"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "The default of 0.5 for this value keeps autotune ISF closer to pump ISF via a weighted average of fullNewISF and pumpISF. 1.0 allows full adjustment, 0 is no adjustment from pump ISF.",
+                            comment: "Autotune ISF Adjustment Fraction"
+                        )
                     )
                 )
 
@@ -227,7 +239,7 @@ extension AlgorithmAdvancedSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Min 5m Carbimpact", comment: "Min 5m Carbimpact")
                         }
                     ),
@@ -235,9 +247,11 @@ extension AlgorithmAdvancedSettings {
                     type: .decimal("min5mCarbimpact"),
                     label: NSLocalizedString("Min 5m Carbimpact", comment: "Min 5m Carbimpact"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "This is a setting for default carb absorption impact per 5 minutes. The default is an expected 8 mg/dL/5min. This affects how fast COB is decayed in situations when carb absorption is not visible in BG deviations. The default of 8 mg/dL/5min corresponds to a minimum carb absorption rate of 24g/hr at a CSF of 4 mg/dL/g.",
-                        comment: "Min 5m Carbimpact"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "This is a setting for default carb absorption impact per 5 minutes. The default is an expected 8 mg/dL/5min. This affects how fast COB is decayed in situations when carb absorption is not visible in BG deviations. The default of 8 mg/dL/5min corresponds to a minimum carb absorption rate of 24g/hr at a CSF of 4 mg/dL/g.",
+                            comment: "Min 5m Carbimpact"
+                        )
                     )
                 )
 
@@ -248,7 +262,7 @@ extension AlgorithmAdvancedSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Remaining Carbs Fraction", comment: "Remaining Carbs Fraction")
                         }
                     ),
@@ -256,9 +270,11 @@ extension AlgorithmAdvancedSettings {
                     type: .decimal("remainingCarbsFraction"),
                     label: NSLocalizedString("Remaining Carbs Fraction", comment: "Remaining Carbs Fraction"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "This is the fraction of carbs we’ll assume will absorb over 4h if we don’t yet see carb absorption.",
-                        comment: "Remaining Carbs Fraction"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "This is the fraction of carbs we’ll assume will absorb over 4h if we don’t yet see carb absorption.",
+                            comment: "Remaining Carbs Fraction"
+                        )
                     )
                 )
 
@@ -269,7 +285,7 @@ extension AlgorithmAdvancedSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Remaining Carbs Cap", comment: "Remaining Carbs Cap")
                         }
                     ),
@@ -277,9 +293,11 @@ extension AlgorithmAdvancedSettings {
                     type: .decimal("remainingCarbsCap"),
                     label: NSLocalizedString("Remaining Carbs Cap", comment: "Remaining Carbs Cap"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "This is the amount of the maximum number of carbs we’ll assume will absorb over 4h if we don’t yet see carb absorption.",
-                        comment: "Remaining Carbs Cap"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "This is the amount of the maximum number of carbs we’ll assume will absorb over 4h if we don’t yet see carb absorption.",
+                            comment: "Remaining Carbs Cap"
+                        )
                     )
                 )
 
@@ -290,7 +308,7 @@ extension AlgorithmAdvancedSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Noisy CGM Target Multiplier", comment: "Noisy CGM Target Multiplier")
                         }
                     ),
@@ -298,9 +316,11 @@ extension AlgorithmAdvancedSettings {
                     type: .decimal("noisyCGMTargetMultiplier"),
                     label: NSLocalizedString("Noisy CGM Target Multiplier", comment: "Noisy CGM Target Multiplier"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "Defaults to 1.3. Increase target by this amount when looping off raw/noisy CGM data",
-                        comment: "Noisy CGM Target Multiplier"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "Defaults to 1.3. Increase target by this amount when looping off raw/noisy CGM data",
+                            comment: "Noisy CGM Target Multiplier"
+                        )
                     )
                 )
             }
@@ -309,7 +329,7 @@ extension AlgorithmAdvancedSettings {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 18 - 18
FreeAPS/Sources/Modules/AutosensSettings/View/AutosensSettingsRootView.swift

@@ -7,7 +7,7 @@ extension AutosensSettings {
         @State var state = StateModel()
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -41,24 +41,22 @@ extension AutosensSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Autosens Max", comment: "Autosens Max")
                         }
                     ),
                     units: state.units,
                     type: .decimal("autosensMax"),
                     label: NSLocalizedString("Autosens Max", comment: "Autosens Max"),
-                    miniHint: """
+                    miniHint:  """
                     The higher limit of the Autosens Ratio
                     Default: **120%**
                     """,
-                    verboseHint: NSLocalizedString(
-                        """
-                        Autosens Max sets the maximum Autosens Ratio used by Autosens, Dynamic ISF, Sigmoid Formula, and/or Autotune. 
-                        The Autosens Ratio is used to calculate the amount of adjustment needed to basals, ISF, and CR.
-                        Increasing this value allows automatic adjustments of basal rates to be higher, ISF to be lower, and CR to be lower. This can result in more insulin given.
-                        """,
-                        comment: "Autosens Max"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "Autosens Max sets the maximum Autosens Ratio used by Autosens, Dynamic ISF, Sigmoid Formula, and/or Autotune. The Autosens Ratio is used to calculate the amount of adjustment needed to basals, ISF, and CR. Increasing this value allows automatic adjustments of basal rates to be higher, ISF to be lower, and CR to be lower. This can result in more insulin given.",
+                            comment: "Autosens Max"
+                        )
                     ),
                     headerText: "Glucose Deviations Algorithm"
                 )
@@ -70,7 +68,7 @@ extension AutosensSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Autosens Min", comment: "Autosens Min")
                         }
                     ),
@@ -81,13 +79,13 @@ extension AutosensSettings {
                     The lower limit of the Autosens Ratio
                     Default: **80%**
                     """,
-                    verboseHint: NSLocalizedString(
+                    verboseHint: Text(NSLocalizedString(
                         """
                         Autosens Min sets the minimum Autosens Ratio used by Autosens, Dynamic ISF, Sigmoid Formula, and/or Autotune. 
                         The Autosens Ratio is used to calculate the amount of adjustment needed to basals, ISF, and CR.
                         Decreasing this value allows automatic adjustments of basal rates to be lower, ISF to be higher, and CR to be higher.
                         """,
-                        comment: "Autosens Min"
+                        comment: "Autosens Min")
                     )
                 )
 
@@ -98,7 +96,7 @@ extension AutosensSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Rewind Resets Autosens", comment: "Rewind Resets Autosens")
                         }
                     ),
@@ -106,9 +104,11 @@ extension AutosensSettings {
                     type: .boolean,
                     label: NSLocalizedString("Rewind Resets Autosens", comment: "Rewind Resets Autosens"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "This feature, enabled by default, resets the autosens ratio to neutral when you rewind your pump, on the assumption that this corresponds to a probable site change. Autosens will begin learning sensitivity anew from the time of the rewind, which may take up to 6 hours. If you usually rewind your pump independently of site changes, you may want to consider disabling this feature.",
-                        comment: "Rewind Resets Autosens"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "This feature, enabled by default, resets the autosens ratio to neutral when you rewind your pump, on the assumption that this corresponds to a probable site change. Autosens will begin learning sensitivity anew from the time of the rewind, which may take up to 6 hours. If you usually rewind your pump independently of site changes, you may want to consider disabling this feature.",
+                            comment: "Rewind Resets Autosens"
+                        )
                     )
                 )
             }
@@ -117,7 +117,7 @@ extension AutosensSettings {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 6 - 6
FreeAPS/Sources/Modules/AutotuneConfig/View/AutotuneConfigRootView.swift

@@ -8,7 +8,7 @@ extension AutotuneConfig {
 
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -63,7 +63,7 @@ extension AutotuneConfig {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Use Autotune"
                         }
                     ),
@@ -71,7 +71,7 @@ extension AutotuneConfig {
                     type: .boolean,
                     label: "Use Autotune",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Autotune… bla bla bla",
+                    verboseHint: Text("Autotune… bla bla bla"),
                     headerText: "Data-driven Adjustments"
                 )
 
@@ -83,7 +83,7 @@ extension AutotuneConfig {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Only Autotune Basal Insulin"
                             }
                         ),
@@ -91,7 +91,7 @@ extension AutotuneConfig {
                         type: .boolean,
                         label: "Only Autotune Basal Insulin",
                         miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                        verboseHint: "Only Autotune Basal Insulin… bla bla bla"
+                        verboseHint: Text("Only Autotune Basal Insulin… bla bla bla")
                     )
                 }
 
@@ -188,7 +188,7 @@ extension AutotuneConfig {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 14 - 10
FreeAPS/Sources/Modules/BolusCalculatorConfig/View/BolusCalculatorConfigRootView.swift

@@ -9,7 +9,7 @@ extension BolusCalculatorConfig {
 
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -55,7 +55,7 @@ extension BolusCalculatorConfig {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Display Meal Presets"
                         }
                     ),
@@ -63,7 +63,7 @@ extension BolusCalculatorConfig {
                     type: .boolean,
                     label: "Display Meal Presets",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                    verboseHint: Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr.")
                 )
 
                 SettingInputSection(
@@ -73,7 +73,7 @@ extension BolusCalculatorConfig {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Recommended Bolus Percentage"
                         }
                     ),
@@ -81,7 +81,7 @@ extension BolusCalculatorConfig {
                     type: .decimal("overrideFactor"),
                     label: "Recommended Bolus Percentage",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Recommended Bolus Percentage… bla bla bla",
+                    verboseHint: Text("Recommended Bolus Percentage… bla bla bla"),
                     headerText: "Calculator Configuration"
                 )
 
@@ -92,7 +92,7 @@ extension BolusCalculatorConfig {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Fatty Meal Factor"
                         }
                     ),
@@ -101,7 +101,9 @@ extension BolusCalculatorConfig {
                     label: "Enable Fatty Meal Factor",
                     conditionalLabel: "Fatty Meal Factor",
                     miniHint: "Lower your bolus recommendation by factor x for fatty meals.",
-                    verboseHint: "You can add the option in your bolus calculator to apply another (!) customizable factor at the end of the calculation which could be useful for fatty meals, e.g Pizza (default 0.7)."
+                    verboseHint: Text(
+                        "You can add the option in your bolus calculator to apply another (!) customizable factor at the end of the calculation which could be useful for fatty meals, e.g Pizza (default 0.7)."
+                    )
                 )
 
                 SettingInputSection(
@@ -111,7 +113,7 @@ extension BolusCalculatorConfig {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Super Bolus & Sweet Meal Factor"
                         }
                     ),
@@ -120,7 +122,9 @@ extension BolusCalculatorConfig {
                     label: "Enable Super Bolus",
                     conditionalLabel: "Super Bolus Factor",
                     miniHint: "Add x times current scheduled basal rate to your bolus recommendation.",
-                    verboseHint: "You can enable the super bolus functionality which could be useful when eating sweets/cake etc. Therefore your current basal rate will be added x-times to your bolus recommendation. You can adjust the factor X here, the default is 2 times your current scheduled basal rate."
+                    verboseHint: Text(
+                        "You can enable the super bolus functionality which could be useful when eating sweets/cake etc. Therefore your current basal rate will be added x-times to your bolus recommendation. You can adjust the factor X here, the default is 2 times your current scheduled basal rate."
+                    )
                 )
             }
             .sheet(isPresented: $shouldDisplayHint) {
@@ -128,7 +132,7 @@ extension BolusCalculatorConfig {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 11 - 6
FreeAPS/Sources/Modules/CGM/View/CGMRootView.swift

@@ -11,7 +11,7 @@ extension CGM {
 
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -62,7 +62,11 @@ extension CGM {
                                         action: {
                                             hintLabel = "Available CGM Types for Trio"
                                             selectedVerboseHint =
-                                                "CGM Types… bla bla \n\nLorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                                AnyView(
+                                                    Text(
+                                                        "CGM Types… bla bla \n\nLorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                                    )
+                                                )
                                             shouldDisplayHint.toggle()
                                         },
                                         label: {
@@ -172,7 +176,8 @@ extension CGM {
                                     Button(
                                         action: {
                                             hintLabel = "CGM Heartbeat"
-                                            selectedVerboseHint = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                            selectedVerboseHint =
+                                                AnyView(Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr."))
                                             shouldDisplayHint.toggle()
                                         },
                                         label: {
@@ -199,7 +204,7 @@ extension CGM {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Smooth Glucose Value"
                             }
                         ),
@@ -207,7 +212,7 @@ extension CGM {
                         type: .boolean,
                         label: "Smooth Glucose Value",
                         miniHint: "Smooth CGM readings using Savitzky–Golay filtering.",
-                        verboseHint: "Smooth Glucose Value… bla bla bla"
+                        verboseHint: Text("Smooth Glucose Value… bla bla bla")
                     )
                 }
                 .scrollContentBackground(.hidden).background(color)
@@ -219,7 +224,7 @@ extension CGM {
                         hintDetent: $hintDetent,
                         shouldDisplayHint: $shouldDisplayHint,
                         hintLabel: hintLabel ?? "",
-                        hintText: selectedVerboseHint ?? "",
+                        hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                         sheetTitle: "Help"
                     )
                 }

+ 8 - 8
FreeAPS/Sources/Modules/CalendarEventSettings/View/CalendarEventSettingsRootView.swift

@@ -7,7 +7,7 @@ extension CalendarEventSettings {
         @StateObject var state = StateModel()
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -41,7 +41,7 @@ extension CalendarEventSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Create Events in Calendar"
                         }
                     ),
@@ -49,7 +49,7 @@ extension CalendarEventSettings {
                     type: .boolean,
                     label: "Create Events in Calendar",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Create Calendar Events… bla bla bla",
+                    verboseHint: Text("Create Calendar Events… bla bla bla"),
                     headerText: "Diabetes Data as Calendar Event"
                 )
 
@@ -71,7 +71,7 @@ extension CalendarEventSettings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Display Emojis as Labels"
                             }
                         ),
@@ -79,7 +79,7 @@ extension CalendarEventSettings {
                         type: .boolean,
                         label: "Display Emojis as Labels",
                         miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                        verboseHint: "Display Emojis as Labels… bla bla bla"
+                        verboseHint: Text("Display Emojis as Labels… bla bla bla")
                     )
 
                     SettingInputSection(
@@ -89,7 +89,7 @@ extension CalendarEventSettings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Display IOB and COB"
                             }
                         ),
@@ -97,7 +97,7 @@ extension CalendarEventSettings {
                         type: .boolean,
                         label: "Display IOB and COB",
                         miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                        verboseHint: "Display IOB and COB… bla bla bla"
+                        verboseHint: Text("Display IOB and COB… bla bla bla")
                     )
                 } else if state.useCalendar {
                     if #available(iOS 17.0, *) {
@@ -119,7 +119,7 @@ extension CalendarEventSettings {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 18 - 18
FreeAPS/Sources/Modules/DynamicSettings/View/DynamicSettingsRootView.swift

@@ -7,7 +7,7 @@ extension DynamicSettings {
         @State var state = StateModel()
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -63,7 +63,7 @@ extension DynamicSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Activate Dynamic Sensitivity (ISF)"
                         }
                     ),
@@ -71,7 +71,7 @@ extension DynamicSettings {
                     type: .boolean,
                     label: "Activate Dynamic Sensitivity (ISF)",
                     miniHint: "Trio calculates insulin sensitivity (ISF) each loop cycle based on current blood sugar, daily insulin use, and an adjustment factor, within set limits.",
-                    verboseHint: "DynamicISF",
+                    verboseHint: Text("DynamicISF"),
                     headerText: "Dynamic Insulin Sensitivity"
                 )
 
@@ -83,7 +83,7 @@ extension DynamicSettings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Activate Dynamic Carb Ratio (CR)"
                             }
                         ),
@@ -91,7 +91,7 @@ extension DynamicSettings {
                         type: .boolean,
                         label: "Activate Dynamic Carb Ratio (CR)",
                         miniHint: "Similar to Dynamic Sensitivity, Trio calculates a dynamic carb ratio every loop cycle.",
-                        verboseHint: "Logarithmic Dynamic Insulin Sensitivity"
+                        verboseHint: Text("Logarithmic Dynamic Insulin Sensitivity")
                     )
 
                     SettingInputSection(
@@ -101,7 +101,7 @@ extension DynamicSettings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Use Sigmoid Formula"
                             }
                         ),
@@ -109,7 +109,7 @@ extension DynamicSettings {
                         type: .boolean,
                         label: "Use Sigmoid Formula",
                         miniHint: "Alternative formula for dynamic ISF, that alters ISF based on distance from target BG",
-                        verboseHint: "Sigmoid  Dynamic Insulin Sensitivity"
+                        verboseHint: Text("Sigmoid  Dynamic Insulin Sensitivity")
                     )
 
                     if !state.sigmoid {
@@ -120,7 +120,7 @@ extension DynamicSettings {
                             selectedVerboseHint: Binding(
                                 get: { selectedVerboseHint },
                                 set: {
-                                    selectedVerboseHint = $0
+                                    selectedVerboseHint = $0.map { AnyView($0) }
                                     hintLabel = "Adjustment Factor"
                                 }
                             ),
@@ -128,7 +128,7 @@ extension DynamicSettings {
                             type: .decimal("adjustmentFactor"),
                             label: "Adjustment Factor",
                             miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                            verboseHint: "Adjustment Factor for logarithmic dynamic sensitvity... bla bla bla"
+                            verboseHint: Text("Adjustment Factor for logarithmic dynamic sensitvity... bla bla bla")
                         )
                     } else {
                         SettingInputSection(
@@ -138,7 +138,7 @@ extension DynamicSettings {
                             selectedVerboseHint: Binding(
                                 get: { selectedVerboseHint },
                                 set: {
-                                    selectedVerboseHint = $0
+                                    selectedVerboseHint = $0.map { AnyView($0) }
                                     hintLabel = "Sigmoid Adjustment Factor"
                                 }
                             ),
@@ -146,7 +146,7 @@ extension DynamicSettings {
                             type: .decimal("adjustmentFactorSigmoid"),
                             label: "Sigmoid Adjustment Factor",
                             miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                            verboseHint: "Sigmoid Adjustment Factor… should be 0.5… bla bla ba"
+                            verboseHint: Text("Sigmoid Adjustment Factor… should be 0.5… bla bla ba")
                         )
                     }
 
@@ -157,7 +157,7 @@ extension DynamicSettings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Weighted Average of TDD"
                             }
                         ),
@@ -165,7 +165,7 @@ extension DynamicSettings {
                         type: .decimal("weightPercentage"),
                         label: "Weighted Average of TDD",
                         miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                        verboseHint: "Weight of past 24 hours"
+                        verboseHint: Text("Weight of past 24 hours")
                     )
 
                     SettingInputSection(
@@ -175,7 +175,7 @@ extension DynamicSettings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Adjust Basal"
                             }
                         ),
@@ -183,7 +183,7 @@ extension DynamicSettings {
                         type: .boolean,
                         label: "Adjust Basal",
                         miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                        verboseHint: "Adjust basal dynamically… bla bla"
+                        verboseHint: Text("Adjust basal dynamically… bla bla")
                     )
 
                     SettingInputSection(
@@ -193,7 +193,7 @@ extension DynamicSettings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Minimum Safety Threshold"
                             }
                         ),
@@ -201,7 +201,7 @@ extension DynamicSettings {
                         type: .decimal("threshold_setting"),
                         label: "Minimum Safety Threshold",
                         miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                        verboseHint: "Minimum Safety Threshold… bla bla bla"
+                        verboseHint: Text("Minimum Safety Threshold… bla bla bla")
                     )
                 }
             }
@@ -210,7 +210,7 @@ extension DynamicSettings {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

Разница между файлами не показана из-за своего большого размера
+ 18 - 14
FreeAPS/Sources/Modules/GeneralSettings/View/UnitsLimitsSettingsRootView.swift


+ 13 - 11
FreeAPS/Sources/Modules/GlucoseNotificationSettings/View/GlucoseNotificationSettingsRootView.swift

@@ -10,7 +10,7 @@ extension GlucoseNotificationSettings {
 
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -61,7 +61,7 @@ extension GlucoseNotificationSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Show Glucose App Badge"
                         }
                     ),
@@ -69,7 +69,7 @@ extension GlucoseNotificationSettings {
                     type: .boolean,
                     label: "Show Glucose App Badge",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
+                    verboseHint: Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr."),
                     headerText: "Various Glucose Notifications"
                 )
 
@@ -80,7 +80,7 @@ extension GlucoseNotificationSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Always Notify Glucose"
                         }
                     ),
@@ -88,7 +88,7 @@ extension GlucoseNotificationSettings {
                     type: .boolean,
                     label: "Always Notify Glucose",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                    verboseHint: Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr.")
                 )
 
                 SettingInputSection(
@@ -98,7 +98,7 @@ extension GlucoseNotificationSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Play Alarm Sound"
                         }
                     ),
@@ -106,7 +106,7 @@ extension GlucoseNotificationSettings {
                     type: .boolean,
                     label: "Play Alarm Sound",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                    verboseHint: Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr.")
                 )
 
                 SettingInputSection(
@@ -116,7 +116,7 @@ extension GlucoseNotificationSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Add Glucose Source to Alarm"
                         }
                     ),
@@ -124,7 +124,7 @@ extension GlucoseNotificationSettings {
                     type: .boolean,
                     label: "Add Glucose Source to Alarm",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                    verboseHint: Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr.")
                 )
 
                 Section {
@@ -154,7 +154,9 @@ extension GlucoseNotificationSettings {
                             action: {
                                 hintLabel = "Low and High Glucose Alarm Limits"
                                 selectedVerboseHint =
-                                    "These two settings limit the range outside of which you will be notified via push notifications. If your CGM readings are below 'Low' or above 'High', you will receive a glucose alarm."
+                                    AnyView(Text(
+                                        "These two settings limit the range outside of which you will be notified via push notifications. If your CGM readings are below 'Low' or above 'High', you will receive a glucose alarm."
+                                    ))
                                 shouldDisplayHint.toggle()
                             },
                             label: {
@@ -172,7 +174,7 @@ extension GlucoseNotificationSettings {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 8 - 6
FreeAPS/Sources/Modules/HealthKit/View/AppleHealthKitRootView.swift

@@ -8,7 +8,7 @@ extension AppleHealthKit {
 
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -40,7 +40,7 @@ extension AppleHealthKit {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Connect to Apple Health"
                         }
                     ),
@@ -48,9 +48,11 @@ extension AppleHealthKit {
                     type: .boolean,
                     label: "Connect to Apple Health",
                     miniHint: "Allows Trio to read from and write to Apple Health.",
-                    verboseHint: NSLocalizedString(
-                        "This allows Trio to read from and write to Apple Health. You must also give permissions in iOS Settings > Health > Data Access. If you enter a glucose value into Apple Health, open Trio to confirm it shows up.",
-                        comment: "Suspend Zeros IOB"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "This allows Trio to read from and write to Apple Health. You must also give permissions in iOS Settings > Health > Data Access. If you enter a glucose value into Apple Health, open Trio to confirm it shows up.",
+                            comment: "Suspend Zeros IOB"
+                        )
                     ),
                     headerText: "Apple Health Integration"
                 )
@@ -80,7 +82,7 @@ extension AppleHealthKit {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 13 - 5
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -788,22 +788,28 @@ extension Home {
                         List {
                             DefinitionRow(
                                 term: "IOB (Insulin on Board)",
-                                definition: "Forecasts BG based on the amount of insulin still active in the body.",
+                                definition: Text("Forecasts BG based on the amount of insulin still active in the body."),
                                 color: .insulin
                             )
                             DefinitionRow(
                                 term: "ZT (Zero-Temp)",
-                                definition: "Forecasts the worst-case blood glucose (BG) scenario if no carbs are absorbed and insulin delivery is stopped until BG starts rising.",
+                                definition: Text(
+                                    "Forecasts the worst-case blood glucose (BG) scenario if no carbs are absorbed and insulin delivery is stopped until BG starts rising."
+                                ),
                                 color: .zt
                             )
                             DefinitionRow(
                                 term: "COB (Carbs on Board)",
-                                definition: "Forecasts BG changes by considering the amount of carbohydrates still being absorbed in the body.",
+                                definition: Text(
+                                    "Forecasts BG changes by considering the amount of carbohydrates still being absorbed in the body."
+                                ),
                                 color: .loopYellow
                             )
                             DefinitionRow(
                                 term: "UAM (Unannounced Meal)",
-                                definition: "Forecasts BG levels and insulin dosing needs for unexpected meals or other causes of BG rises without prior notice.",
+                                definition: Text(
+                                    "Forecasts BG levels and insulin dosing needs for unexpected meals or other causes of BG rises without prior notice."
+                                ),
                                 color: .uam
                             )
                         }
@@ -813,7 +819,9 @@ extension Home {
                         List {
                             DefinitionRow(
                                 term: "Cone of Uncertainty",
-                                definition: "For simplicity reasons, oref's various forecast curves are displayed as a \"Cone of Uncertainty\" that depicts a possible, forecasted range of future glucose fluctuation based on the current data and the algothim's result.\n\nTo modify the forecast display type, go to Trio Settings > Features > User Interface > Forecast Display Type.",
+                                definition: Text(
+                                    "For simplicity reasons, oref's various forecast curves are displayed as a \"Cone of Uncertainty\" that depicts a possible, forecasted range of future glucose fluctuation based on the current data and the algothim's result.\n\nTo modify the forecast display type, go to Trio Settings > Features > User Interface > Forecast Display Type."
+                                ),
                                 color: Color.blue.opacity(0.5)
                             )
                         }

+ 11 - 5
FreeAPS/Sources/Modules/LiveActivitySettings/View/LiveActivitySettingsRootView.swift

@@ -9,7 +9,7 @@ extension LiveActivitySettings {
 
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -68,7 +68,7 @@ extension LiveActivitySettings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Enable Live Activity"
                             }
                         ),
@@ -76,7 +76,9 @@ extension LiveActivitySettings {
                         type: .boolean,
                         label: "Enable Live Activity",
                         miniHint: "Live Activities display Trio's glucose readings, and other current data on the iPhone Lock Screen and in the Dynamic Island",
-                        verboseHint: "With Live Activities, you can let Trio display most current data, e.g. glucose reading from CGM, insulin on board, carbohydrates on board, or even a glucose trend chart, on the iPhone Lock Screen and in the Dynamic Island. It allows you to refer to live information at a glance and perform quick actions in your diabetes management.",
+                        verboseHint: Text(
+                            "With Live Activities, you can let Trio display most current data, e.g. glucose reading from CGM, insulin on board, carbohydrates on board, or even a glucose trend chart, on the iPhone Lock Screen and in the Dynamic Island. It allows you to refer to live information at a glance and perform quick actions in your diabetes management."
+                        ),
                         headerText: "Display Live Data From Trio"
                     )
 
@@ -104,7 +106,11 @@ extension LiveActivitySettings {
                                         action: {
                                             hintLabel = "Lock Screen Widget Style"
                                             selectedVerboseHint =
-                                                "Trio's simple lock screen widget only display current glucose reading, trend arrow, delta and the timestamp of the current reading.\n\nThe detailed Lock Screen widget offers users a glucose chart, glucose trend arrow, glucose delta, current insulin and carbohydrates on board, and an icon as an indicator for running overrides."
+                                                AnyView(
+                                                    Text(
+                                                        "Trio's simple lock screen widget only display current glucose reading, trend arrow, delta and the timestamp of the current reading.\n\nThe detailed Lock Screen widget offers users a glucose chart, glucose trend arrow, glucose delta, current insulin and carbohydrates on board, and an icon as an indicator for running overrides."
+                                                    )
+                                                )
                                             shouldDisplayHint.toggle()
                                         },
                                         label: {
@@ -139,7 +145,7 @@ extension LiveActivitySettings {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 22 - 13
FreeAPS/Sources/Modules/MealSettings/View/MealSettingsRootView.swift

@@ -9,7 +9,7 @@ extension MealSettings {
 
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -173,7 +173,8 @@ extension MealSettings {
                                 Button(
                                     action: {
                                         hintLabel = "Limits per Entry"
-                                        selectedVerboseHint = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                        selectedVerboseHint =
+                                            AnyView(Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr."))
                                         shouldDisplayHint.toggle()
                                     },
                                     label: {
@@ -194,7 +195,7 @@ extension MealSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Display and Allow Fat and Protein Entries"
                         }
                     ),
@@ -202,7 +203,9 @@ extension MealSettings {
                     type: .boolean,
                     label: "Display and Allow Fat and Protein Entries",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Allows fat and protein to be converted into future carb equivalents using the Warsaw formula of kilocalories divided by 10.\n\nDefaults: Spread Duration: 8 h, Spread Interval: 30 min, FPU Factor: 0.5, Delay 60 min.",
+                    verboseHint: Text(
+                        "Allows fat and protein to be converted into future carb equivalents using the Warsaw formula of kilocalories divided by 10.\n\nDefaults: Spread Duration: 8 h, Spread Interval: 30 min, FPU Factor: 0.5, Delay 60 min."
+                    ),
                     headerText: "Fat and Protein"
                 )
 
@@ -214,7 +217,7 @@ extension MealSettings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Fat and Protein Delay"
                             }
                         ),
@@ -222,7 +225,7 @@ extension MealSettings {
                         type: .decimal("delay"),
                         label: "Fat and Protein Delay",
                         miniHint: "Delay is time from now until the first future carb entry.",
-                        verboseHint: "X-Axis Interval Step… bla bla bla"
+                        verboseHint: Text("X-Axis Interval Step… bla bla bla")
                     )
 
                     SettingInputSection(
@@ -232,7 +235,7 @@ extension MealSettings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Maximum Duration (hours)"
                             }
                         ),
@@ -240,7 +243,9 @@ extension MealSettings {
                         type: .decimal("timeCap"),
                         label: "Maximum Duration (hours)",
                         miniHint: "Carb spread over a maximum number of hours (5-12).",
-                        verboseHint: "This spreads the carb equivilants over a maximum duration setting that can be configured from 5-12 hours."
+                        verboseHint: Text(
+                            "This spreads the carb equivilants over a maximum duration setting that can be configured from 5-12 hours."
+                        )
                     )
 
                     SettingInputSection(
@@ -250,7 +255,7 @@ extension MealSettings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Spread Interval (minutes)"
                             }
                         ),
@@ -258,7 +263,9 @@ extension MealSettings {
                         type: .decimal("minuteInterval"),
                         label: "Spread Interval (minutes)",
                         miniHint: "Interval in minutes is how many minutes are between entries.",
-                        verboseHint: "Interval in minutes is how many minutes are between entries. The shorter the interval, the smoother the result. 10, 15, 20, 30, or 60 are reasonable choices."
+                        verboseHint: Text(
+                            "Interval in minutes is how many minutes are between entries. The shorter the interval, the smoother the result. 10, 15, 20, 30, or 60 are reasonable choices."
+                        )
                     )
 
                     SettingInputSection(
@@ -268,7 +275,7 @@ extension MealSettings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Fat and Protein Factor"
                             }
                         ),
@@ -276,7 +283,9 @@ extension MealSettings {
                         type: .decimal("individualAdjustmentFactor"),
                         label: "Fat and Protein Factor",
                         miniHint: "Influences how many carb equivalents are recorded for fat and protein.",
-                        verboseHint: "The Fat and Protein Factor influences how much effect the fat and protein has on the entries. 1.0 is full effect (original Warsaw Method) and 0.5 is half effect. Note that you may find that your normal carb ratio needs to increase to a larger number if you begin adding fat and protein entries. For this reason, it is best to start with a factor of about 0.5 to ease into it."
+                        verboseHint: Text(
+                            "The Fat and Protein Factor influences how much effect the fat and protein has on the entries. 1.0 is full effect (original Warsaw Method) and 0.5 is half effect. Note that you may find that your normal carb ratio needs to increase to a larger number if you begin adding fat and protein entries. For this reason, it is best to start with a factor of about 0.5 to ease into it."
+                        )
                     )
                 }
             }
@@ -285,7 +294,7 @@ extension MealSettings {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 8 - 5
FreeAPS/Sources/Modules/NightscoutConfig/View/NightscoutConfigRootView.swift

@@ -12,7 +12,7 @@ extension NightscoutConfig {
         @State var importedHasRun = false
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -111,7 +111,11 @@ extension NightscoutConfig {
                                     action: {
                                         hintLabel = "Import Settings from Nightscout"
                                         selectedVerboseHint =
-                                            "This will overwrite the following Trio therapy settings: \n • Basal Rates \n • Insulin Sensitivities \n • Carb Ratios \n • Target Glucose \n • Duration of Insulin Action"
+                                            AnyView(
+                                                Text(
+                                                    "This will overwrite the following Trio therapy settings: \n • Basal Rates \n • Insulin Sensitivities \n • Carb Ratios \n • Target Glucose \n • Duration of Insulin Action"
+                                                )
+                                            )
                                         shouldDisplayHint.toggle()
                                     },
                                     label: {
@@ -150,8 +154,7 @@ extension NightscoutConfig {
                                     Button(
                                         action: {
                                             hintLabel = "Backfill Glucose from Nightscout"
-                                            selectedVerboseHint =
-                                                "Explanation… limitation… etc."
+                                            selectedVerboseHint = AnyView(Text("Explanation… limitation… etc."))
                                             shouldDisplayHint.toggle()
                                         },
                                         label: {
@@ -178,7 +181,7 @@ extension NightscoutConfig {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 16 - 6
FreeAPS/Sources/Modules/NightscoutConfig/View/NightscoutFetchView.swift

@@ -6,7 +6,7 @@ struct NightscoutFetchView: View {
 
     @State private var shouldDisplayHint: Bool = false
     @State var hintDetent = PresentationDetent.large
-    @State var selectedVerboseHint: String?
+    @State var selectedVerboseHint: AnyView?
     @State var hintLabel: String?
     @State private var decimalPlaceholder: Decimal = 0.0
     @State private var booleanPlaceholder: Bool = false
@@ -38,7 +38,7 @@ struct NightscoutFetchView: View {
                 selectedVerboseHint: Binding(
                     get: { selectedVerboseHint },
                     set: {
-                        selectedVerboseHint = $0
+                        selectedVerboseHint = $0.map { AnyView($0) }
                         hintLabel = "Allow Fetching from Nightscout"
                     }
                 ),
@@ -46,7 +46,9 @@ struct NightscoutFetchView: View {
                 type: .boolean,
                 label: "Allow Fetching from Nightscout",
                 miniHint: "Enable fetching of selected data sets from Nightscout. See hint for more details.",
-                verboseHint: "The Fetch Treatments toggle enables fetching of carbs and temp targets entered in Careportal or by another uploading device than Trio from Nightscout.",
+                verboseHint: Text(
+                    "The Fetch Treatments toggle enables fetching of carbs and temp targets entered in Careportal or by another uploading device than Trio from Nightscout."
+                ),
                 headerText: "Remote & Fetch Capabilities"
             )
 
@@ -58,7 +60,7 @@ struct NightscoutFetchView: View {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Allow Remote Control of Trio"
                         }
                     ),
@@ -66,7 +68,15 @@ struct NightscoutFetchView: View {
                     type: .boolean,
                     label: "Allow Remote Control of Trio",
                     miniHint: "Enables selected remote control capabilities via Nightscout. See hint for more details.",
-                    verboseHint: "When enabled you allow these remote functions through announcements from Nightscout: \n • Suspend/Resume Pump \n • Opening/Closing Loop \n  • Set Temp Basal \n • Enact Bolus"
+                    verboseHint: VStack(spacing: 10) {
+                        Text("When enabled you allow these remote functions through announcements from Nightscout:")
+                        VStack(alignment: .leading) {
+                            Text("• Suspend/Resume Pump")
+                            Text("• Opening/Closing Loop")
+                            Text("• Set Temp Basal")
+                            Text("• Enact Bolus")
+                        }
+                    }
                 )
             } else {
                 Section {
@@ -79,7 +89,7 @@ struct NightscoutFetchView: View {
                 hintDetent: $hintDetent,
                 shouldDisplayHint: $shouldDisplayHint,
                 hintLabel: hintLabel ?? "",
-                hintText: selectedVerboseHint ?? "",
+                hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                 sheetTitle: "Help"
             )
         }

+ 8 - 6
FreeAPS/Sources/Modules/NightscoutConfig/View/NightscoutUploadView.swift

@@ -5,7 +5,7 @@ struct NightscoutUploadView: View {
 
     @State private var shouldDisplayHint: Bool = false
     @State var hintDetent = PresentationDetent.large
-    @State var selectedVerboseHint: String?
+    @State var selectedVerboseHint: AnyView?
     @State var hintLabel: String?
     @State private var decimalPlaceholder: Decimal = 0.0
     @State private var booleanPlaceholder: Bool = false
@@ -37,7 +37,7 @@ struct NightscoutUploadView: View {
                 selectedVerboseHint: Binding(
                     get: { selectedVerboseHint },
                     set: {
-                        selectedVerboseHint = $0
+                        selectedVerboseHint = $0.map { AnyView($0) }
                         hintLabel = "Allow Uploading to Nightscout"
                         shouldDisplayHint = true
                     }
@@ -46,7 +46,9 @@ struct NightscoutUploadView: View {
                 type: .boolean,
                 label: "Allow Uploading to Nightscout",
                 miniHint: "Enables upload of selected data sets to Nightscout. See hint for more details.",
-                verboseHint: "The Upload Treatments toggle enables uploading of carbs, temp targets, device status, preferences and settings."
+                verboseHint: Text(
+                    "The Upload Treatments toggle enables uploading of carbs, temp targets, device status, preferences and settings."
+                )
             )
 
             if state.changeUploadGlucose {
@@ -57,7 +59,7 @@ struct NightscoutUploadView: View {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Upload Glucose"
                             shouldDisplayHint = true
                         }
@@ -66,7 +68,7 @@ struct NightscoutUploadView: View {
                     type: .boolean,
                     label: "Upload Glucose",
                     miniHint: "Enables uploading of CGM readings to Nightscout.",
-                    verboseHint: "Write stuff here."
+                    verboseHint: Text("Write stuff here.")
                 )
             }
         }
@@ -75,7 +77,7 @@ struct NightscoutUploadView: View {
                 hintDetent: $hintDetent,
                 shouldDisplayHint: $shouldDisplayHint,
                 hintLabel: hintLabel ?? "",
-                hintText: selectedVerboseHint ?? "",
+                hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                 sheetTitle: "Help"
             )
         }

+ 4 - 4
FreeAPS/Sources/Modules/NightscoutConfig/View/ProfileImport/ReviewInsulinActionView.swift

@@ -10,7 +10,7 @@ struct ReviewInsulinActionView: BaseView {
 
     @State private var shouldDisplayHint: Bool = false
     @State private var hintDetent = PresentationDetent.large
-    @State private var selectedVerboseHint: String?
+    @State private var selectedVerboseHint: AnyView?
     @State private var hintLabel: String?
     @State private var decimalPlaceholder: Decimal = 0.0
     @State private var booleanPlaceholder: Bool = false
@@ -42,7 +42,7 @@ struct ReviewInsulinActionView: BaseView {
                 selectedVerboseHint: Binding(
                     get: { selectedVerboseHint },
                     set: {
-                        selectedVerboseHint = $0
+                        selectedVerboseHint = $0.map { AnyView($0) }
                         hintLabel = "Duration of Insulin Action"
                     }
                 ),
@@ -50,7 +50,7 @@ struct ReviewInsulinActionView: BaseView {
                 type: .decimal("dia"),
                 label: "Duration of Insulin Action",
                 miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                verboseHint: "Duration of Insulin Action… bla bla bla",
+                verboseHint: Text("Duration of Insulin Action… bla bla bla"),
                 headerText: "Review imported DIA"
             )
         }
@@ -59,7 +59,7 @@ struct ReviewInsulinActionView: BaseView {
                 hintDetent: $hintDetent,
                 shouldDisplayHint: $shouldDisplayHint,
                 hintLabel: hintLabel ?? "",
-                hintText: selectedVerboseHint ?? "",
+                hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                 sheetTitle: "Help"
             )
         }

+ 3 - 4
FreeAPS/Sources/Modules/PumpConfig/View/PumpConfigRootView.swift

@@ -9,7 +9,7 @@ extension PumpConfig {
 
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -73,8 +73,7 @@ extension PumpConfig {
                                         Button(
                                             action: {
                                                 hintLabel = "Pump Pairing to Trio"
-                                                selectedVerboseHint =
-                                                    "Explanation… limitation… etc."
+                                                selectedVerboseHint = AnyView(Text("Explanation… limitation… etc."))
                                                 shouldDisplayHint.toggle()
                                             },
                                             label: {
@@ -119,7 +118,7 @@ extension PumpConfig {
                         hintDetent: $hintDetent,
                         shouldDisplayHint: $shouldDisplayHint,
                         hintLabel: hintLabel ?? "",
-                        hintText: selectedVerboseHint ?? "",
+                        hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                         sheetTitle: "Help"
                     )
                 }

Разница между файлами не показана из-за своего большого размера
+ 74 - 50
FreeAPS/Sources/Modules/SMBSettings/View/SMBSettingsRootView.swift


+ 11 - 4
FreeAPS/Sources/Modules/Settings/View/SettingsRootView.swift

@@ -14,7 +14,7 @@ extension Settings {
 
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -91,7 +91,7 @@ extension Settings {
                         selectedVerboseHint: Binding(
                             get: { selectedVerboseHint },
                             set: {
-                                selectedVerboseHint = $0
+                                selectedVerboseHint = $0.map { AnyView($0) }
                                 hintLabel = "Closed Loop"
                             }
                         ),
@@ -99,7 +99,14 @@ extension Settings {
                         type: .boolean,
                         label: "Closed Loop",
                         miniHint: "Enables automated insulin delivery. Requires active CGM sensor session and connected pump.",
-                        verboseHint: "Running Trio in closed loop mode requires an active CGM sensor session and a connected pump. This enables automated insulin delivery.\n\nBefore enabling, dial in your settings (basal / insulin sensitivity / carb ratio), and familiarize yourself with the app.",
+                        verboseHint: VStack(spacing: 10) {
+                            Text(
+                                "Running Trio in closed loop mode requires an active CGM sensor session and a connected pump. This enables automated insulin delivery."
+                            )
+                            Text(
+                                "Before enabling, dial in your settings (basal / insulin sensitivity / carb ratio), and familiarize yourself with the app."
+                            )
+                        },
                         headerText: "Automated Insulin Delivery"
                     )
 
@@ -303,7 +310,7 @@ extension Settings {
                         hintDetent: $hintDetent,
                         shouldDisplayHint: $shouldDisplayHint,
                         hintLabel: hintLabel ?? "",
-                        hintText: selectedVerboseHint ?? "",
+                        hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                         sheetTitle: "Help"
                     )
                 }

+ 3 - 1
FreeAPS/Sources/Modules/Settings/View/TidepoolStartView.swift

@@ -113,7 +113,9 @@ struct TidepoolStartView: BaseView {
                 hintDetent: $hintDetent,
                 shouldDisplayHint: $shouldDisplayHint,
                 hintLabel: "Connect to Tidepool",
-                hintText: "When connected, uploading of carbs, bolus, basal and glucose from Trio to your Tidepool account is enabled.\n\nUse your Tidepool credentials to login. If you dont already have a Tidepool account, you can sign up for one on the login page.",
+                hintText: Text(
+                    "When connected, uploading of carbs, bolus, basal and glucose from Trio to your Tidepool account is enabled.\n\nUse your Tidepool credentials to login. If you dont already have a Tidepool account, you can sign up for one on the login page."
+                ),
                 sheetTitle: "Help"
             )
         }

+ 4 - 4
FreeAPS/Sources/Modules/ShortcutsConfig/View/ShortcutsConfigView.swift

@@ -11,7 +11,7 @@ extension ShortcutsConfig {
 
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -63,7 +63,7 @@ extension ShortcutsConfig {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Allow Bolusing with Shortcuts"
                         }
                     ),
@@ -71,7 +71,7 @@ extension ShortcutsConfig {
                     type: .boolean,
                     label: "Allow Bolusing with Shortcuts",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Allow Bolusing with Shortcuts… bla bla bla"
+                    verboseHint: Text("Allow Bolusing with Shortcuts… bla bla bla")
                 )
             }
             .sheet(isPresented: $shouldDisplayHint) {
@@ -79,7 +79,7 @@ extension ShortcutsConfig {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 32 - 22
FreeAPS/Sources/Modules/TargetBehavoir/View/TargetBehavoirRootView.swift

@@ -7,7 +7,7 @@ extension TargetBehavoir {
         @StateObject var state = StateModel()
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -41,7 +41,7 @@ extension TargetBehavoir {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString(
                                 "High Temptarget Raises Sensitivity",
                                 comment: "High Temptarget Raises Sensitivity"
@@ -55,9 +55,11 @@ extension TargetBehavoir {
                         comment: "High Temptarget Raises Sensitivity"
                     ),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "Defaults to false. When set to true, raises sensitivity (lower sensitivity ratio) for temp targets set to >= 111. Synonym for exercise_mode. The higher your temp target above 110 will result in more sensitive (lower) ratios, e.g., temp target of 120 results in sensitivity ratio of 0.75, while 140 results in 0.6 (with default halfBasalTarget of 160).",
-                        comment: "High Temptarget Raises Sensitivity"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "Defaults to false. When set to true, raises sensitivity (lower sensitivity ratio) for temp targets set to >= 111. Synonym for exercise_mode. The higher your temp target above 110 will result in more sensitive (lower) ratios, e.g., temp target of 120 results in sensitivity ratio of 0.75, while 140 results in 0.6 (with default halfBasalTarget of 160).",
+                            comment: "High Temptarget Raises Sensitivity"
+                        )
                     ),
                     headerText: "Algorithmic Target Settings"
                 )
@@ -69,7 +71,7 @@ extension TargetBehavoir {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString(
                                 "Low Temptarget Lowers Sensitivity",
                                 comment: "Low Temptarget Lowers Sensitivity"
@@ -83,9 +85,11 @@ extension TargetBehavoir {
                         comment: "Low Temptarget Lowers Sensitivity"
                     ),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "Defaults to false. When set to true, can lower sensitivity (higher sensitivity ratio) for temptargets <= 99. The lower your temp target below 100 will result in less sensitive (higher) ratios, e.g., temp target of 95 results in sensitivity ratio of 1.09, while 85 results in 1.33 (with default halfBasalTarget of 160).",
-                        comment: "Low Temptarget Lowers Sensitivity"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "Defaults to false. When set to true, can lower sensitivity (higher sensitivity ratio) for temptargets <= 99. The lower your temp target below 100 will result in less sensitive (higher) ratios, e.g., temp target of 95 results in sensitivity ratio of 1.09, while 85 results in 1.33 (with default halfBasalTarget of 160).",
+                            comment: "Low Temptarget Lowers Sensitivity"
+                        )
                     )
                 )
 
@@ -96,7 +100,7 @@ extension TargetBehavoir {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Sensitivity Raises Target", comment: "Sensitivity Raises Target")
                         }
                     ),
@@ -104,9 +108,11 @@ extension TargetBehavoir {
                     type: .boolean,
                     label: NSLocalizedString("Sensitivity Raises Target", comment: "Sensitivity Raises Target"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "When true, raises BG target when autosens detects sensitivity",
-                        comment: "Sensitivity Raises Target"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "When true, raises BG target when autosens detects sensitivity",
+                            comment: "Sensitivity Raises Target"
+                        )
                     )
                 )
 
@@ -117,7 +123,7 @@ extension TargetBehavoir {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Resistance Lowers Target", comment: "Resistance Lowers Target")
                         }
                     ),
@@ -125,9 +131,11 @@ extension TargetBehavoir {
                     type: .boolean,
                     label: NSLocalizedString("Resistance Lowers Target", comment: "Resistance Lowers Target"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "Defaults to false. When true, will lower BG target when autosens detects resistance",
-                        comment: "Resistance Lowers Target"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "Defaults to false. When true, will lower BG target when autosens detects resistance",
+                            comment: "Resistance Lowers Target"
+                        )
                     )
                 )
 
@@ -138,7 +146,7 @@ extension TargetBehavoir {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString("Half Basal Exercise Target", comment: "Half Basal Exercise Target")
                         }
                     ),
@@ -146,9 +154,11 @@ extension TargetBehavoir {
                     type: .decimal("halfBasalExerciseTarget"),
                     label: NSLocalizedString("Half Basal Exercise Target", comment: "Half Basal Exercise Target"),
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: NSLocalizedString(
-                        "Set to a number, e.g. 160, which means when temp target is 160 mg/dL, run 50% basal at this level (120 = 75%; 140 = 60%). This can be adjusted, to give you more control over your exercise modes.",
-                        comment: "Half Basal Exercise Target"
+                    verboseHint: Text(
+                        NSLocalizedString(
+                            "Set to a number, e.g. 160, which means when temp target is 160 mg/dL, run 50% basal at this level (120 = 75%; 140 = 60%). This can be adjusted, to give you more control over your exercise modes.",
+                            comment: "Half Basal Exercise Target"
+                        )
                     )
                 )
             }
@@ -157,7 +167,7 @@ extension TargetBehavoir {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 27 - 18
FreeAPS/Sources/Modules/UserInterfaceSettings/View/UserInterfaceSettingsRootView.swift

@@ -8,7 +8,7 @@ extension UserInterfaceSettings {
 
         @State private var shouldDisplayHint: Bool = false
         @State var hintDetent = PresentationDetent.large
-        @State var selectedVerboseHint: String?
+        @State var selectedVerboseHint: AnyView?
         @State var hintLabel: String?
         @State private var decimalPlaceholder: Decimal = 0.0
         @State private var booleanPlaceholder: Bool = false
@@ -79,7 +79,8 @@ extension UserInterfaceSettings {
                                 Button(
                                     action: {
                                         hintLabel = "Color Scheme Preference"
-                                        selectedVerboseHint = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                        selectedVerboseHint =
+                                            AnyView(Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr."))
                                         shouldDisplayHint.toggle()
                                     },
                                     label: {
@@ -116,7 +117,11 @@ extension UserInterfaceSettings {
                                 action: {
                                     hintLabel = "Glucose Color Scheme"
                                     selectedVerboseHint =
-                                        "Glucose Color Scheme... Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                        AnyView(
+                                            Text(
+                                                "Glucose Color Scheme... Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                            )
+                                        )
                                     shouldDisplayHint.toggle()
                                 },
                                 label: {
@@ -147,7 +152,8 @@ extension UserInterfaceSettings {
                                 Button(
                                     action: {
                                         hintLabel = "Show Main Chart X- and Y-Axis Grid Lines"
-                                        selectedVerboseHint = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                        selectedVerboseHint =
+                                            AnyView(Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr."))
                                         shouldDisplayHint.toggle()
                                     },
                                     label: {
@@ -168,7 +174,7 @@ extension UserInterfaceSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Show Low and High Thresholds"
                         }
                     ),
@@ -176,7 +182,7 @@ extension UserInterfaceSettings {
                     type: .boolean,
                     label: "Show Low and High Thresholds",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Display Low and High Thresholds… bla bla bla"
+                    verboseHint: Text("Display Low and High Thresholds… bla bla bla")
                 )
 
                 if state.rulerMarks {
@@ -263,7 +269,8 @@ extension UserInterfaceSettings {
                                 Button(
                                     action: {
                                         hintLabel = "Low and High Thresholds"
-                                        selectedVerboseHint = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                        selectedVerboseHint =
+                                            AnyView(Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr."))
                                         shouldDisplayHint.toggle()
                                     },
                                     label: {
@@ -299,7 +306,8 @@ extension UserInterfaceSettings {
                             Button(
                                 action: {
                                     hintLabel = "Forecast Display Type"
-                                    selectedVerboseHint = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                    selectedVerboseHint =
+                                        AnyView(Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr."))
                                     shouldDisplayHint.toggle()
                                 },
                                 label: {
@@ -319,7 +327,7 @@ extension UserInterfaceSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "X-Axis Interval Step"
                         }
                     ),
@@ -327,7 +335,7 @@ extension UserInterfaceSettings {
                     type: .decimal("hours"),
                     label: "X-Axis Interval Step",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "X-Axis Interval Step… bla bla bla"
+                    verboseHint: Text("X-Axis Interval Step… bla bla bla")
                 )
 
                 Section {
@@ -352,7 +360,8 @@ extension UserInterfaceSettings {
                             Button(
                                 action: {
                                     hintLabel = "Total Insulin Display Type"
-                                    selectedVerboseHint = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr."
+                                    selectedVerboseHint =
+                                        AnyView(Text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr."))
                                     shouldDisplayHint.toggle()
                                 },
                                 label: {
@@ -373,7 +382,7 @@ extension UserInterfaceSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Override HbA1c Unit"
                         }
                     ),
@@ -381,7 +390,7 @@ extension UserInterfaceSettings {
                     type: .boolean,
                     label: "Override HbA1c Unit",
                     miniHint: "Display HbA1c in mmol/L or %. Default is percent.",
-                    verboseHint: "Override HbA1c Unit… bla bla bla",
+                    verboseHint: Text("Override HbA1c Unit… bla bla bla"),
                     headerText: "Trio Statistics"
                 )
 
@@ -393,7 +402,7 @@ extension UserInterfaceSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Standing / Laying TIR Chart"
                         }
                     ),
@@ -401,7 +410,7 @@ extension UserInterfaceSettings {
                     type: .boolean,
                     label: "Standing / Laying TIR Chart",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Standing / Laying TIR Chart… bla bla bla"
+                    verboseHint: Text("Standing / Laying TIR Chart… bla bla bla")
                 )
 
                 SettingInputSection(
@@ -411,7 +420,7 @@ extension UserInterfaceSettings {
                     selectedVerboseHint: Binding(
                         get: { selectedVerboseHint },
                         set: {
-                            selectedVerboseHint = $0
+                            selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = "Show Carbs Required Badge"
                         }
                     ),
@@ -420,7 +429,7 @@ extension UserInterfaceSettings {
                     label: "Show Carbs Required Badge",
                     conditionalLabel: "Carbs Required Threshold",
                     miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                    verboseHint: "Show Carbs Required Badge… bla bla bla",
+                    verboseHint: Text("Show Carbs Required Badge… bla bla bla"),
                     headerText: "Carbs Required Badge"
                 )
             }
@@ -429,7 +438,7 @@ extension UserInterfaceSettings {
                     hintDetent: $hintDetent,
                     shouldDisplayHint: $shouldDisplayHint,
                     hintLabel: hintLabel ?? "",
-                    hintText: selectedVerboseHint ?? "",
+                    hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                     sheetTitle: "Help"
                 )
             }

+ 7 - 7
FreeAPS/Sources/Modules/WatchConfig/View/WatchConfigAppleWatchView.swift

@@ -5,7 +5,7 @@ struct WatchConfigAppleWatchView: View {
 
     @State private var shouldDisplayHint: Bool = false
     @State var hintDetent = PresentationDetent.large
-    @State var selectedVerboseHint: String?
+    @State var selectedVerboseHint: AnyView?
     @State var hintLabel: String?
     @State private var decimalPlaceholder: Decimal = 0.0
     @State private var booleanPlaceholder: Bool = false
@@ -59,7 +59,7 @@ struct WatchConfigAppleWatchView: View {
                             Button(
                                 action: {
                                     hintLabel = "Display on Watch"
-                                    selectedVerboseHint = "Display on Watch… bla bla bla"
+                                    selectedVerboseHint = AnyView(Text("Display on Watch… bla bla bla"))
                                     shouldDisplayHint.toggle()
                                 },
                                 label: {
@@ -80,7 +80,7 @@ struct WatchConfigAppleWatchView: View {
                 selectedVerboseHint: Binding(
                     get: { selectedVerboseHint },
                     set: {
-                        selectedVerboseHint = $0
+                        selectedVerboseHint = $0.map { AnyView($0) }
                         hintLabel = "Show Protein and Fat"
                     }
                 ),
@@ -88,7 +88,7 @@ struct WatchConfigAppleWatchView: View {
                 type: .boolean,
                 label: "Show Protein and Fat",
                 miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                verboseHint: "Show Protein and Fat… bla bla bla"
+                verboseHint: Text("Show Protein and Fat… bla bla bla")
             )
 
             SettingInputSection(
@@ -98,7 +98,7 @@ struct WatchConfigAppleWatchView: View {
                 selectedVerboseHint: Binding(
                     get: { selectedVerboseHint },
                     set: {
-                        selectedVerboseHint = $0
+                        selectedVerboseHint = $0.map { AnyView($0) }
                         hintLabel = "Confirm Bolus Faster"
                     }
                 ),
@@ -106,7 +106,7 @@ struct WatchConfigAppleWatchView: View {
                 type: .boolean,
                 label: "Confirm Bolus Faster",
                 miniHint: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",
-                verboseHint: "Confirm Bolus Faster… bla bla bla"
+                verboseHint: Text("Confirm Bolus Faster… bla bla bla")
             )
         }
         .sheet(isPresented: $shouldDisplayHint) {
@@ -114,7 +114,7 @@ struct WatchConfigAppleWatchView: View {
                 hintDetent: $hintDetent,
                 shouldDisplayHint: $shouldDisplayHint,
                 hintLabel: hintLabel ?? "",
-                hintText: selectedVerboseHint ?? "",
+                hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                 sheetTitle: "Help"
             )
         }

+ 3 - 3
FreeAPS/Sources/Modules/WatchConfig/View/WatchConfigGarminView.swift

@@ -5,7 +5,7 @@ struct WatchConfigGarminView: View {
 
     @State private var shouldDisplayHint: Bool = false
     @State var hintDetent = PresentationDetent.large
-    @State var selectedVerboseHint: String?
+    @State var selectedVerboseHint: AnyView?
     @State var hintLabel: String?
     @State private var decimalPlaceholder: Decimal = 0.0
     @State private var booleanPlaceholder: Bool = false
@@ -59,7 +59,7 @@ struct WatchConfigGarminView: View {
                             Button(
                                 action: {
                                     hintLabel = "Add Device"
-                                    selectedVerboseHint = "Add Garmin Device… bla bla bla"
+                                    selectedVerboseHint = AnyView(Text("Add Garmin Device… bla bla bla"))
                                     shouldDisplayHint.toggle()
                                 },
                                 label: {
@@ -89,7 +89,7 @@ struct WatchConfigGarminView: View {
                 hintDetent: $hintDetent,
                 shouldDisplayHint: $shouldDisplayHint,
                 hintLabel: hintLabel ?? "",
-                hintText: selectedVerboseHint ?? "",
+                hintText: selectedVerboseHint ?? AnyView(EmptyView()),
                 sheetTitle: "Help"
             )
         }

+ 3 - 3
FreeAPS/Sources/Views/DefinitionRow.swift

@@ -1,9 +1,9 @@
 import Foundation
 import SwiftUI
 
-struct DefinitionRow: View {
+struct DefinitionRow<DefinitionView: View>: View {
     var term: String
-    var definition: String
+    var definition: DefinitionView
     var color: Color?
     var fontSize: Font?
 
@@ -15,7 +15,7 @@ struct DefinitionRow: View {
                 }
                 Text(term).font(fontSize ?? .subheadline).fontWeight(.semibold)
             }.padding(.bottom, 5)
-            Text(definition)
+            definition
                 .font(fontSize ?? .subheadline)
                 .foregroundColor(.secondary)
         }

+ 2 - 2
FreeAPS/Sources/Views/SettingInputHintView.swift

@@ -1,10 +1,10 @@
 import SwiftUI
 
-struct SettingInputHintView: View {
+struct SettingInputHintView<HintView: View>: View {
     @Binding var hintDetent: PresentationDetent
     @Binding var shouldDisplayHint: Bool
     var hintLabel: String
-    var hintText: String
+    var hintText: HintView
     var sheetTitle: String
 
     @Environment(\.colorScheme) private var colorScheme

+ 4 - 4
FreeAPS/Sources/Views/SettingInputSection.swift

@@ -1,6 +1,6 @@
 import SwiftUI
 
-struct SettingInputSection: View {
+struct SettingInputSection<VerboseHint: View>: View {
     enum SettingInputSectionType: Equatable {
         case decimal(String)
         case boolean
@@ -23,14 +23,14 @@ struct SettingInputSection: View {
     @Binding var decimalValue: Decimal
     @Binding var booleanValue: Bool
     @Binding var shouldDisplayHint: Bool
-    @Binding var selectedVerboseHint: String?
+    @Binding var selectedVerboseHint: (any View)?
 
     var units: GlucoseUnits
     var type: SettingInputSectionType
     var label: String
     var conditionalLabel: String?
     var miniHint: String
-    var verboseHint: String
+    var verboseHint: VerboseHint
     var headerText: String?
     var footerText: String?
 
@@ -235,7 +235,7 @@ struct SettingInputSection: View {
         }.padding(.top)
     }
 
-    private func hintSection(miniHint: String, shouldDisplayHint: Binding<Bool>, verboseHint: String) -> some View {
+    private func hintSection(miniHint: String, shouldDisplayHint: Binding<Bool>, verboseHint: VerboseHint) -> some View {
         HStack(alignment: .top) {
             Text(miniHint)
                 .font(.footnote)