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

Merge pull request #556 from dnzxy/fix-cosmetics

Various Cosmetic Fixes
Deniz Cengiz 1 год назад
Родитель
Сommit
a3d0355e3b

+ 8 - 0
Trio/Sources/Localizations/Main/Localizable.xcstrings

@@ -39079,6 +39079,7 @@
       }
     },
     "Are you sure to add %@ g of carbs ?" : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -82040,6 +82041,9 @@
         }
       }
     },
+    "Do you want to add %@ grams of carbs?" : {
+
+    },
     "Don’t Allow" : {
       "localizations" : {
         "bg" : {
@@ -113096,6 +113100,7 @@
       }
     },
     "How many carbs ?" : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -113201,6 +113206,9 @@
         }
       }
     },
+    "How many carbs do you want to add?" : {
+
+    },
     "How Trio Manages Contact Images" : {
       "localizations" : {
         "bg" : {

+ 2 - 1
Trio/Sources/Modules/Home/View/Header/PumpView.swift

@@ -99,7 +99,8 @@ struct PumpView: View {
                     HStack {
                         Image(systemName: hourglassIcon)
                             .font(.callout)
-                            .foregroundStyle(timerColor)
+                            .foregroundStyle(timerColor, Color.yellow)
+                            .symbolRenderingMode(.palette)
 
                         let remainingTimeString = remainingTimeString(time: date.timeIntervalSince(timerDate))
 

+ 8 - 10
Trio/Sources/Modules/Home/View/HomeRootView.swift

@@ -399,18 +399,16 @@ extension Home {
                 /// eventualBG string at bottomTrailing
 
                 if let eventualBG = state.enactedAndNonEnactedDeterminations.first?.eventualBG {
-                    let bg = eventualBG as Decimal
+                    let eventualGlucose = eventualBG as Decimal
                     HStack {
                         Image(systemName: "arrow.right.circle")
-                            .font(.callout).fontWeight(.bold)
-                        Text(
-                            Formatter.decimalFormatterWithTwoFractionDigits.string(
-                                from: (
-                                    state.units == .mmolL ? bg
-                                        .asMmolL : bg
-                                ) as NSNumber
-                            )!
-                        ).font(.callout).fontWeight(.bold).fontDesign(.rounded)
+                            .font(.callout)
+                            .fontWeight(.bold)
+
+                        Text(state.units == .mgdL ? eventualGlucose.description : eventualGlucose.formattedAsMmolL)
+                            .font(.callout)
+                            .fontWeight(.bold)
+                            .fontDesign(.rounded)
                     }
                     // aligns the evBG icon exactly with the first pixel of loop status icon
                     .padding(.leading, 12)

+ 2 - 2
Trio/Sources/Shortcuts/Carbs/AddCarbPresetIntent.swift

@@ -76,13 +76,13 @@ import Swinject
             if let cq = carbQuantity {
                 quantityCarbs = cq
             } else {
-                quantityCarbs = try await $carbQuantity.requestValue("How many carbs ?")
+                quantityCarbs = try await $carbQuantity.requestValue("How many carbs do you want to add?")
             }
 
             let quantityCarbsName = quantityCarbs.toString()
             if confirmBeforeApplying {
                 try await requestConfirmation(
-                    result: .result(dialog: "Are you sure to add \(quantityCarbsName) g of carbs ?")
+                    result: .result(dialog: "Do you want to add \(quantityCarbsName) grams of carbs?")
                 )
             }