Преглед изворни кода

Update Settings Descriptions

tmhastings пре 1 година
родитељ
комит
e85ab9456e

+ 12 - 9
FreeAPS/Sources/Modules/AlgorithmAdvancedSettings/View/AlgorithmAdvancedSettingsRootView.swift

@@ -273,19 +273,22 @@ extension AlgorithmAdvancedSettings {
                         set: {
                             selectedVerboseHint = $0.map { AnyView($0) }
                             hintLabel = NSLocalizedString(
-                                "Autotune ISF Adjustment Fraction",
-                                comment: "Autotune ISF Adjustment Fraction"
+                                "Autotune ISF Adjustment Percent",
+                                comment: "Autotune ISF Adjustment Percent"
                             )
                         }
                     ),
                     units: state.units,
                     type: .decimal("autotuneISFAdjustmentFraction"),
-                    label: NSLocalizedString("Autotune ISF Adjustment Fraction", comment: "Autotune ISF Adjustment Fraction"),
-                    miniHint: "Using Autotune is not advised",
+                    label: NSLocalizedString("Autotune ISF Adjustment Percent", comment: "Autotune ISF Adjustment Percent"),
+                    miniHint: """
+                    Using Autotune is not advised
+                    Default: 50%
+                    """,
                     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"
+                            "The default of 50% for this value keeps autotune ISF closer to pump ISF via a weighted average of fullNewISF and pumpISF. 100% allows full adjustment, 0% is no adjustment from pump ISF.",
+                            comment: "Autotune ISF Adjustment Percent"
                         )
                     )
                 )
@@ -298,18 +301,18 @@ extension AlgorithmAdvancedSettings {
                         get: { selectedVerboseHint },
                         set: {
                             selectedVerboseHint = $0.map { AnyView($0) }
-                            hintLabel = NSLocalizedString("Min 5m Carbimpact", comment: "Min 5m Carbimpact")
+                            hintLabel = NSLocalizedString("Min 5m Carb Impact", comment: "Min 5m Carb Impact")
                         }
                     ),
                     units: state.units,
                     type: .decimal("min5mCarbimpact"),
-                    label: NSLocalizedString("Min 5m Carbimpact", comment: "Min 5m Carbimpact"),
+                    label: NSLocalizedString("Min 5m Carb Impact", comment: "Min 5m Carb Impact"),
                     miniHint: """
                     Set the default rate of carb absorption when no clear impact on blood glucose is visible
                     Default: 8 mg/dL/5min
                     """,
                     verboseHint: VStack {
-                        Text("Default: 8 mg/dL/5 min").bold()
+                        Text("Default: 8 mg/dL/5min").bold()
                         Text("""
 
                         The Min 5m Carbimpact setting determines the default expected glucose rise (in mg/dL) over a 5-minute period from carbs when the system cannot detect clear absorption from your blood glucose levels. 

+ 21 - 9
FreeAPS/Sources/Modules/DynamicSettings/View/DynamicSettingsRootView.swift

@@ -80,15 +80,15 @@ extension DynamicSettings {
 
                         Dynamic ISF allows Trio to calculate a new ISF with each loop cycle by considering your current blood glucose (BG), total daily dose (TDD) of insulin, and adjustment factor (AF). This helps tailor your insulin response more accurately in real-time. 
 
-                         Dynamic ISF calculates a Dynamic Ratio, determining how much your profile ISF will be adjusted every loop cycle, ensuring it stays within safe limits set by your Autosens Min/Max settings. It provides more precise insulin dosing by responding to changes in insulin needs throughout the day.
+                         Dynamic ISF calculates a Dynamic Ratio, determining how much your Profile ISF will be adjusted every loop cycle, ensuring it stays within safe limits set by your Autosens Min/Max settings. It provides more precise insulin dosing by responding to changes in insulin needs throughout the day.
                         """)
                         Text("""
 
-                         Dynamic Ratio = profile.sens x AF x TDD x log (BG / insulinFactor + 1) / 1800
+                         Dynamic Ratio = Profile ISF × AF × TDD × log(BG ÷ Insulin Factor + 1) ÷ 1800
 
-                         New ISF = profile ISF / Dynamic Ratio
+                         New ISF = Profile ISF / Dynamic Ratio
 
-                         insulinFactor = 120 - InsulinPeakTimeInMinutes
+                         Insulin Factor = 120 - Insulin Peak Time
                         """).italic()
                     },
                     headerText: "Dynamic ISF (Sensitivity)"
@@ -103,7 +103,7 @@ extension DynamicSettings {
                             get: { selectedVerboseHint },
                             set: {
                                 selectedVerboseHint = $0.map { AnyView($0) }
-                                hintLabel = "Activate Dynamic Carb Ratio (CR)"
+                                hintLabel = "Activate Dynamic CR (Carb Ratio)"
                             }
                         ),
                         units: state.units,
@@ -117,7 +117,7 @@ extension DynamicSettings {
                             Text("Default: OFF").bold()
                             Text("""
 
-                            Dynamic CR adjusts your carb ratio in real-time, depending on your Dynamic Ratio. When this ratio increases (indicating you need more insulin), the carb ratio is adjusted to make your insulin dosing more effective. When the ratio decreases (indicating you need less insulin), the carb ratio is scaled back to avoid over-delivery.
+                            Dynamic CR adjusts your carb ratio (CR) in real-time, depending on your Dynamic Ratio. When this ratio increases (indicating you need more insulin), the CR is adjusted to make your insulin dosing more effective. When the ratio decreases (indicating you need less insulin), the carb ratio is scaled back to avoid over-delivery.
 
                             """)
                             Text(
@@ -188,7 +188,9 @@ extension DynamicSettings {
                                 Text("Default: 80%").bold()
                                 Text("""
 
-                                The Adjustment Factor (AF) allows you to control how aggressively your dynamic ISF responds to changes in blood glucose levels. A higher value means a stronger correction, increasing or decreasing the sensitivity of your insulin delivery to highs and lows in your glucose readings.
+                                The Adjustment Factor (AF) allows you to control how aggressively your dynamic ISF responds to changes in blood glucose levels. 
+
+                                A higher value means a stronger correction, increasing or decreasing the sensitivity of your insulin delivery to highs and lows in your glucose readings.
 
                                 """)
                                 Text("The maximum effect of this setting is limited by the Autosens Min/Max values.").italic()
@@ -217,7 +219,11 @@ extension DynamicSettings {
                                 Text("Default: 50%").bold()
                                 Text("""
 
-                                The Sigmoid Adjustment Factor (AF) allows you to control how aggressively your Dynamic ISF using the Sigmoid Formula responds to changes in blood glucose levels. Higher values lead to stronger corrections for high or low blood glucose levels, making the curve steeper. This setting allows for a more responsive system, but like other dynamic settings, its effect is capped by the Autosens Min/Max limits.
+                                The Sigmoid Adjustment Factor (AF) allows you to control how aggressively your Dynamic ISF using the Sigmoid Formula responds to changes in blood glucose levels. 
+
+                                Higher values lead to stronger corrections for high or low blood glucose levels, making the curve steeper. 
+
+                                This setting allows for a more responsive system, but like other dynamic settings, its effect is capped by the Autosens Min/Max limits.
 
                                 """)
                                 Text(
@@ -250,7 +256,13 @@ extension DynamicSettings {
                             Text("Default: 65%").bold()
                             Text("""
 
-                            This setting adjusts how much weight is given to your recent total daily insulin dose (TDD) when calculating Dynamic ISF and Dynamic CR. At the default setting, 65% of the calculation is based on the last 24 hours of insulin use, with the remaining 35% considering the last 10 days of data. Setting this to 100% means only the past 24 hours will be used. A lower value smooths out these variations for more stability.
+                            This setting adjusts how much weight is given to your recent total daily insulin dose (TDD) when calculating Dynamic ISF and Dynamic CR. 
+
+                            At the default setting, 65% of the calculation is based on the last 24 hours of insulin use, with the remaining 35% considering the last 10 days of data. 
+
+                            Setting this to 100% means only the past 24 hours will be used. 
+
+                            A lower value smooths out these variations for more stability.
                             """)
                         }
                     )

+ 61 - 19
FreeAPS/Sources/Modules/GlucoseNotificationSettings/View/GlucoseNotificationSettingsRootView.swift

@@ -68,10 +68,17 @@ extension GlucoseNotificationSettings {
                     units: state.units,
                     type: .boolean,
                     label: "Show Glucose App Badge",
-                    miniHint: "Show your current glucose reading at the top of the Trio app icon",
-                    verboseHint: Text(
-                        "This will add your current glucose on the top right of your Trio icon as a red notification badge."
-                    ),
+                    miniHint: """
+                    Show your current glucose reading at the top of the Trio app icon
+                    Default: OFF
+                    """,
+                    verboseHint: VStack {
+                        Text("Default: OFF").bold()
+                        Text("""
+
+                        This will add your current glucose on the top right of your Trio icon as a red notification badge.
+                        """)
+                    },
                     headerText: "Various Glucose Notifications"
                 )
 
@@ -89,8 +96,17 @@ extension GlucoseNotificationSettings {
                     units: state.units,
                     type: .boolean,
                     label: "Always Notify Glucose",
-                    miniHint: "A notification will be triggered every time your glucose is updated in Trio",
-                    verboseHint: Text("A notification will be triggered every time your glucose is updated in Trio.")
+                    miniHint: """
+                    A notification will be triggered every time your glucose is updated in Trio
+                    Default: OFF
+                    """,
+                    verboseHint: VStack {
+                        Text("Default: OFF").bold()
+                        Text("""
+
+                        A notification will be triggered every time your glucose is updated in Trio.
+                        """)
+                    }
                 )
 
                 SettingInputSection(
@@ -107,8 +123,17 @@ extension GlucoseNotificationSettings {
                     units: state.units,
                     type: .boolean,
                     label: "Play Alarm Sound",
-                    miniHint: "This will cause a sound to be triggered by every Trio notification",
-                    verboseHint: Text("This will cause a sound to be triggered by every Trio notification.")
+                    miniHint: """
+                    This will cause a sound to be triggered by every Trio notification
+                    Default: OFF
+                    """,
+                    verboseHint: VStack {
+                        Text("Default: OFF").bold()
+                        Text("""
+
+                        This will cause a sound to be triggered by every Trio notification.
+                        """)
+                    }
                 )
 
                 SettingInputSection(
@@ -125,8 +150,17 @@ extension GlucoseNotificationSettings {
                     units: state.units,
                     type: .boolean,
                     label: "Add Glucose Source to Alarm",
-                    miniHint: "The source of the glucose reading will be added to the notification",
-                    verboseHint: Text("The source of the glucose reading will be added to the notification.")
+                    miniHint: """
+                    The source of the glucose reading will be added to the notification
+                    Default: OFF
+                    """,
+                    verboseHint: VStack {
+                        Text("Default: OFF").bold()
+                        Text("""
+
+                        The source of the glucose reading will be added to the notification.
+                        """)
+                    }
                 )
 
                 Section {
@@ -145,20 +179,28 @@ extension GlucoseNotificationSettings {
                     }
 
                     HStack(alignment: .top) {
-                        Text(
-                            "Set the upper and lower limits for glucose alarms. See hint for more details."
-                        )
-                        .font(.footnote)
-                        .foregroundColor(.secondary)
-                        .lineLimit(nil)
+                        Text("""
+                        Set the glucose alarm limits
+                        Tap hint icon for details
+                        """)
+                            .font(.footnote)
+                            .foregroundColor(.secondary)
+                            .lineLimit(nil)
                         Spacer()
                         Button(
                             action: {
                                 hintLabel = "Low and High Glucose Alarm Limits"
                                 selectedVerboseHint =
-                                    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."
-                                    ))
+                                    AnyView(VStack {
+                                        Text("Low Default: 72 mg/dL").bold()
+                                        Text("High Default: 270 mg/dL").bold()
+                                        Text("""
+
+                                        These two settings determine the range outside of which you will be notified via push notifications. 
+
+                                        If your CGM readings are below the Low value or above the High value, you will receive a glucose alarm.
+                                        """)
+                                    })
                                 shouldDisplayHint.toggle()
                             },
                             label: {

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

@@ -47,13 +47,18 @@ extension AppleHealthKit {
                     units: state.units,
                     type: .boolean,
                     label: "Connect to Apple Health",
-                    miniHint: "Allows Trio to read from and write to Apple Health.",
+                    miniHint: """
+                    Allows Trio to read from and write to Apple Health
+                    Default: OFF
+                    """,
                     verboseHint: VStack {
+                        Text("Default: OFF").bold()
                         Text("""
-                         This allows Trio to read from and write to Apple Health.
 
-                         You must also give permissions in iOS Settings > Health > Data Access.
+                        This allows Trio to read from and write to Apple Health.
+
                         """)
+                        Text("You must also give permissions in iOS System Settings for the Health app.").bold().italic()
                     },
                     headerText: "Apple Health Integration"
                 )
@@ -66,11 +71,11 @@ extension AppleHealthKit {
                                 Text("Give Apple Health Write Permissions")
                             }.padding(.bottom)
                             Text("""
-                            1. Open the Settings app on your iOS device.
-                            2. Scroll down and select "Health."
-                            3. Tap on "Data Access & Devices."
-                            4. Find and select "Trio" from the list of apps.
-                            5. Ensure that the "Write Data" option is enabled for the desired health metrics.
+                            1. Open the Settings app on your iOS device
+                            2. Scroll down or type "Health" in the settings search bar and select the "Health" app
+                            3. Tap on "Data Access & Devices"
+                            4. Find and select "Trio" from the list of apps
+                            5. Ensure that the "Write Data" option is enabled for the desired health metrics
                             """).font(.footnote)
                         }
                         .padding(.vertical)

+ 28 - 15
FreeAPS/Sources/Modules/LiveActivitySettings/View/LiveActivitySettingsRootView.swift

@@ -75,15 +75,24 @@ extension LiveActivitySettings {
                         units: state.units,
                         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: VStack {
+                        miniHint: """
+                        Live Activities display Trio's glucose readings and other current data on the iPhone Lock Screen and in the Dynamic Island
+                        Default: OFF
+                        """,
+                        verboseHint: VStack(spacing: 10) {
+                            Text("Default: OFF").bold()
                             Text("""
+
                             With Live Activities, Trio displays your choice of the following current data on your iPhone's Lock Screen and in the Dynamic Island:
-                            ● Current Glucose Reading
-                            ● IOB: Insulin On Board
-                            ● COB: Carbohydrates On Board
-                            ● Last Updated: Time of Last Loop Cycle
-                            ● Glucose Trend Chart
+                            """)
+                            VStack(alignment: .leading) {
+                                Text("• Current Glucose Reading")
+                                Text("• IOB: Insulin On Board")
+                                Text("• COB: Carbohydrates On Board")
+                                Text("• Last Updated: Time of Last Loop Cycle")
+                                Text("• Glucose Trend Chart")
+                            }
+                            Text("""
 
                             It allows you to refer to live information at a glance and perform quick actions in your diabetes management.
                             """)
@@ -116,15 +125,19 @@ extension LiveActivitySettings {
                                             hintLabel = "Lock Screen Widget Style"
                                             selectedVerboseHint =
                                                 AnyView(
-                                                    Text("""
-                                                    Trio's Simple Lock Screen Widget only display current glucose reading, trend arrow, delta and the timestamp of the current reading.
+                                                    VStack(spacing: 10) {
+                                                        Text("""
+                                                        Trio's Simple Lock Screen Widget only display current glucose reading, trend arrow, delta and the timestamp of the current reading.
 
-                                                    The Detailed Lock Screen Widget offers users a glucose chart as well as the ability to customize the information provided in the Detailed Widget using the following options:
-                                                    ● Current Glucose Reading
-                                                    ● IOB: Insulin On Board
-                                                    ● COB: Carbohydrates On Board
-                                                    ● Last Updated: Time of Last Loop Cycle
-                                                    """)
+                                                        The Detailed Lock Screen Widget offers users a glucose chart as well as the ability to customize the information provided in the Detailed Widget using the following options:
+                                                        """)
+                                                        VStack(alignment: .leading) {
+                                                            Text("• Current Glucose Reading")
+                                                            Text("• IOB: Insulin On Board")
+                                                            Text("• COB: Carbohydrates On Board")
+                                                            Text("• Last Updated: Time of Last Loop Cycle")
+                                                        }
+                                                    }
                                                 )
                                             shouldDisplayHint.toggle()
                                         },

+ 15 - 10
FreeAPS/Sources/Modules/MealSettings/View/MealSettingsRootView.swift

@@ -209,30 +209,35 @@ extension MealSettings {
                     type: .boolean,
                     label: "Enable Fat and Protein Entries",
                     miniHint: """
-                    Enabling this setting allows you to log fat and protein, which are then converted into future carb equivalents (FPU) using the Warsaw Method.
+                    Allows you to add fat and protein macros to meals
                     Default: OFF
                     """,
                     verboseHint: VStack(spacing: 10) {
                         Text("Default: OFF").bold()
                         Text("""
-                        
+
+                        Enabling this setting allows you to log fat and protein, which are then converted into future carb equivalents using the Warsaw Method.
+
                         The Warsaw Method helps account for the delayed glucose spikes caused by fat and protein in meals. It uses Fat-Protein Units (FPU) to calculate the carb effect from fat and protein. The system spreads insulin delivery over several hours to mimic natural insulin release, helping to manage post-meal glucose spikes.
-                        
+
                         """)
                         Text("Fat Conversion").bold()
-                        Text("fat(g) × 90% = 𝑭").italic()
+                        Text("𝑭 = fat(g) × 90%").italic()
                         Text("""
-                        
-                         Protein Conversion
+
+                        Protein Conversion
                         """).bold()
-                        Text("protein(g) × 40% = 𝑷").italic()
+                        Text("𝑷 = protein(g) × 40%").italic()
                         Text("""
-                        
-                         FPU Conversion
+
+                        FPU Conversion
                         """).bold()
                         Text("𝑭 + 𝑷 = g CHO").italic()
                         Text(
-                            "You can personalize the conversion calculation by adjusting the following settings that will appear when this option is enabled:"
+                            """
+
+                            You can personalize the conversion calculation by adjusting the following settings that will appear when this option is enabled:
+                            """
                         )
                         VStack(alignment: .leading) {
                             Text("• Fat and Protein Delay")

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

@@ -66,7 +66,16 @@ extension NightscoutConfig {
                                 importAlert = Alert(
                                     title: Text("Import Therapy Settings?"),
                                     message: Text(
-                                        "Are you sure you want to import profile settings from Nightscout?\n\nThis will overwrite the following Trio therapy settings: Basal Rates, Insulin Sensitivities, Carb Ratios, Target Glucose, and Duration of Insulin Action."
+                                        """
+                                        Are you sure you want to import profile settings from Nightscout?
+
+                                        This will overwrite the following Trio therapy settings:
+                                            • Basal Rates
+                                            • Insulin Sensitivities
+                                            • Carb Ratios
+                                            • Target Glucose
+                                            • Duration of Insulin Action
+                                        """
                                     ),
                                     primaryButton: .default(
                                         Text("Yes, Import!"),
@@ -101,7 +110,10 @@ extension NightscoutConfig {
 
                             HStack(alignment: .top) {
                                 Text(
-                                    "You can import therapy settings from Nightscout. See hint for more information which settings will be overwritten."
+                                    """
+                                    Import therapy settings from Nightscout
+                                    See hint for the list of settings available for import
+                                    """
                                 )
                                 .font(.footnote)
                                 .foregroundColor(.secondary)
@@ -113,7 +125,14 @@ extension NightscoutConfig {
                                         selectedVerboseHint =
                                             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"
+                                                    """
+                                                    This will overwrite the following Trio therapy settings:
+                                                        • Basal Rates
+                                                        • Insulin Sensitivities
+                                                        • Carb Ratios
+                                                        • Target Glucose
+                                                        • Duration of Insulin Action
+                                                    """
                                                 )
                                             )
                                         shouldDisplayHint.toggle()
@@ -145,7 +164,7 @@ extension NightscoutConfig {
 
                                 HStack(alignment: .top) {
                                     Text(
-                                        "You can backfill missing glucose data from Nightscout."
+                                        "Backfill missing glucose data from Nightscout"
                                     )
                                     .font(.footnote)
                                     .foregroundColor(.secondary)
@@ -154,7 +173,12 @@ extension NightscoutConfig {
                                     Button(
                                         action: {
                                             hintLabel = "Backfill Glucose from Nightscout"
-                                            selectedVerboseHint = AnyView(Text("Explanation… limitation… etc."))
+                                            selectedVerboseHint =
+                                                AnyView(
+                                                    Text(
+                                                        "This will backfill 24 hours of glucose data from your connected Nightscout URL to Trio"
+                                                    )
+                                                )
                                             shouldDisplayHint.toggle()
                                         },
                                         label: {

+ 1 - 1
FreeAPS/Sources/Modules/NightscoutConfig/View/NightscoutUploadView.swift

@@ -46,7 +46,7 @@ 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: VStack(spacing: 10) {
+                verboseHint: VStack(spacing: 5) {
                     Text("The Upload Treatments toggle enables uploading of:")
                     VStack(alignment: .leading) {
                         Text("• Carbs")