Pārlūkot izejas kodu

Adjustments to footer texts after review/feedback from @dnzxy
- Break up long strings in several text elements (enables re-use of some already existing translations)
- Change button text "Connect" to "Connect to Nightscout" in NightscoutConnectView

dsnallfot 2 gadi atpakaļ
vecāks
revīzija
dd19b7426b

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

@@ -24,12 +24,34 @@ extension NightscoutConfig {
                 NavigationLink("Fetch and Remote Control", destination: NightscoutFetchView(state: state))
                 NavigationLink("Fetch and Remote Control", destination: NightscoutFetchView(state: state))
 
 
                 Section(
                 Section(
-                    header: Text("Import Settings"),
-                    footer: Text(
-                        "Importing settings from Nightscout will overwrite these settings in Trio Settings -> Configuration:\n • DIA (Pump settings)\n • Basal Profile\n • Insulin Sensitivities\n • Carb Ratios\n • Target Glucose"
-                    )
+                    header: Text("Import Settings from Nightscout"),
+                    footer: VStack(alignment: .leading, spacing: 2) {
+                        Text(
+                            "Importing settings from Nightscout will overwrite these settings in Trio Settings -> Configuration:"
+                        )
+                        HStack {
+                            Text("•")
+                            Text("DIA (Pump settings)")
+                        }
+                        HStack {
+                            Text("•")
+                            Text("Basal Profile")
+                        }
+                        HStack {
+                            Text("•")
+                            Text("Insulin Sensitivities")
+                        }
+                        HStack {
+                            Text("•")
+                            Text("Carb Ratios")
+                        }
+                        HStack {
+                            Text("•")
+                            Text("Target Glucose")
+                        }
+                    }
                 ) {
                 ) {
-                    Button("Import settings from Nightscout") {
+                    Button("Import settings") {
                         importAlert = Alert(
                         importAlert = Alert(
                             title: Text("Import settings?"),
                             title: Text("Import settings?"),
                             message: Text(
                             message: Text(

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

@@ -35,7 +35,7 @@ struct NightscoutConnectView: View {
                 }
                 }
             }
             }
             Section {
             Section {
-                Button("Connect") { state.connect() }
+                Button("Connect to Nightscout") { state.connect() }
                     .disabled(state.url.isEmpty || state.connecting)
                     .disabled(state.url.isEmpty || state.connecting)
                 Button("Delete") { state.delete() }.foregroundColor(.red).disabled(state.connecting)
                 Button("Delete") { state.delete() }.foregroundColor(.red).disabled(state.connecting)
             }
             }

+ 27 - 9
FreeAPS/Sources/Modules/NightscoutConfig/View/NightscoutFetchView.swift

@@ -20,15 +20,33 @@ struct NightscoutFetchView: View {
                     "The Fetch Treatments toggle enables fetching of carbs and temp targets entered in Careportal or by another uploading device than Trio."
                     "The Fetch Treatments toggle enables fetching of carbs and temp targets entered in Careportal or by another uploading device than Trio."
                 )
                 )
             }
             }
-            Section {
-                Toggle("Remote Control", isOn: $state.allowAnnouncements)
-                    .disabled(!state.isDownloadEnabled)
-            } header: { Text("Allow Remote control of Trio")
-            } footer: {
-                Text(
-                    "Fetch Treatments needs to be allowed to be able to toggle on Remote Control.\n\nWhen 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."
-                )
-            }
+            Section(
+                header: Text("Allow Remote control of Trio"),
+                footer: VStack(alignment: .leading, spacing: 2) {
+                    Text("Fetch Treatments needs to be allowed to be able to toggle on Remote Control.")
+                    Text("\nWhen enabled you allow these remote functions through announcements from Nightscout:")
+                    HStack {
+                        Text("•")
+                        Text("Suspend/Resume Pump")
+                    }
+                    HStack {
+                        Text("•")
+                        Text("Opening/Closing Loop")
+                    }
+                    HStack {
+                        Text("•")
+                        Text("Set Temp Basal")
+                    }
+                    HStack {
+                        Text("•")
+                        Text("Enact Bolus")
+                    }
+                }
+            )
+                {
+                    Toggle("Remote Control", isOn: $state.allowAnnouncements)
+                        .disabled(!state.isDownloadEnabled)
+                }
         }
         }
         .navigationTitle("Fetch and Remote")
         .navigationTitle("Fetch and Remote")
     }
     }

+ 13 - 11
FreeAPS/Sources/Modules/NightscoutConfig/View/NightscoutUploadView.swift

@@ -6,18 +6,20 @@ struct NightscoutUploadView: View {
 
 
     var body: some View {
     var body: some View {
         Form {
         Form {
-            Section {
-                Toggle("Upload Treatments and Settings", isOn: $state.isUploadEnabled)
+            Section(
+                header: Text("Allow Uploading to Nightscout"),
+                footer: VStack(alignment: .leading, spacing: 2) {
+                    Text(
+                        "The Upload Treatments toggle enables uploading of carbs, temp targets, device status, preferences and settings."
+                    )
+                    Text("\nThe Upload Glucose toggle enables uploading of CGM readings.")
+                }
+            )
+                {
+                    Toggle("Upload Treatments and Settings", isOn: $state.isUploadEnabled)
 
 
-                Toggle("Upload Glucose", isOn: $state.uploadGlucose).disabled(!state.changeUploadGlucose)
-
-            } header: {
-                Text("Allow Uploading to Nightscout")
-            } footer: {
-                Text(
-                    "The Upload Treatments toggle enables uploading of carbs, temp targets, device status, preferences and settings.\n\nThe Upload Glucose enables uploading of CGM readings."
-                )
-            }
+                    Toggle("Upload Glucose", isOn: $state.uploadGlucose).disabled(!state.changeUploadGlucose)
+                }
         }
         }
         .navigationTitle("Upload")
         .navigationTitle("Upload")
     }
     }