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

Merge branch 'dev' into Crowdin

Jon B.M 2 лет назад
Родитель
Сommit
652ca7bdb6

+ 2 - 2
.github/workflows/build_iAPS.yml

@@ -22,7 +22,7 @@ jobs:
     steps:
       # Uncomment to manually select Xcode version if needed
       - name: Select Xcode version
-        run: "sudo xcode-select --switch /Applications/Xcode_14.3.app/Contents/Developer"
+        run: "sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer"
 
       # Checks-out the repo
       - name: Checkout Repo
@@ -64,4 +64,4 @@ jobs:
           name: build-artifacts
           path: |
             artifacts
-            buildlog
+            buildlog

+ 3 - 0
FreeAPS/Sources/Localizations/Main/en.lproj/Localizable.strings

@@ -1392,6 +1392,9 @@ Enact a temp Basal or a temp target */
 /* */
 "Save as Preset" = "Save as Preset";
 
+/* */
+"Predictions" = "Predictions";
+
 /* ----------------------- New Bolus Calculator ---------------------------*/
 
 /* Warning about bolus recommendation. Title */

+ 2 - 2
FreeAPS/Sources/Modules/Bolus/View/Predictions.swift

@@ -101,9 +101,9 @@ struct PredictionView: View {
         .frame(minHeight: Config.height)
         .chartForegroundStyleScale([
             "IOB": Color(.insulin),
-            "UAM": Color(.UAM),
+            "UAM": .uam,
             "COB": Color(.loopYellow),
-            "ZT": Color(.ZT)
+            "ZT": .zt
         ])
         .chartYAxisLabel(NSLocalizedString("Glucose, ", comment: "") + units.rawValue, alignment: .center)
     }

+ 8 - 7
FreeAPS/Sources/Modules/OverrideProfilesConfig/View/OverrideProfilesRootView.swift

@@ -72,6 +72,14 @@ extension OverrideProfilesConfig {
                 }
                 Section {
                     VStack {
+                        Spacer()
+                        Text("\(state.percentage.formatted(.number)) %")
+                            .foregroundColor(
+                                state
+                                    .percentage >= 130 ? .red :
+                                    (isEditing ? .orange : .blue)
+                            )
+                            .font(.largeTitle)
                         Slider(
                             value: $state.percentage,
                             in: 10 ... 200,
@@ -80,13 +88,6 @@ extension OverrideProfilesConfig {
                                 isEditing = editing
                             }
                         ).accentColor(state.percentage >= 130 ? .red : .blue)
-                        Text("\(state.percentage.formatted(.number)) %")
-                            .foregroundColor(
-                                state
-                                    .percentage >= 130 ? .red :
-                                    (isEditing ? .orange : .blue)
-                            )
-                            .font(.largeTitle)
                         Spacer()
                         Toggle(isOn: $state._indefinite) {
                             Text("Enable indefinitely")