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

A bunch of personal modifications

Jon B.M 5 лет назад
Родитель
Сommit
94f44e75b9

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
FreeAPS/Resources/javascript/bundle/determine-basal.js


+ 2 - 0
FreeAPS/Sources/APS/Storage/GlucoseStorage.swift

@@ -82,6 +82,8 @@ final class BaseGlucoseStorage: GlucoseStorage, Injectable {
     }
 
     func isGlucoseNotFlat() -> Bool {
+        return true // To completely avoid more "To Flat" errors (I don't understand Why I still get them?
+
         let last5 = recent().suffix(5)
         guard last5.count == 5 else { return true }
 

+ 1 - 1
FreeAPS/Sources/Modules/Home/HomeViewModel.swift

@@ -257,7 +257,7 @@ extension Home {
 
         func openCGM() {
             guard !settingsManager.settings.dontShowNS else {
-                var url = URL(string: "xdripswift://")!
+                let url = URL(string: "xdripswift://")!
                 UIApplication.shared.open(url, options: [:], completionHandler: nil)
                 return
             }

+ 1 - 1
FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

@@ -26,7 +26,7 @@ struct MainChartView: View {
         static let minAdditionalWidth: CGFloat = 150
         static let maxGlucose = 450
         static let minGlucose = 70
-        static let yLinesCount = 5
+        static let yLinesCount = 4 // Test
         static let bolusSize: CGFloat = 8
         static let bolusScale: CGFloat = 2.5
         static let carbsSize: CGFloat = 10

+ 10 - 10
FreeAPS/Sources/Modules/Home/View/Header/CurrentGlucoseView.swift

@@ -66,16 +66,16 @@ struct CurrentGlucoseView: View {
 //        recentBG = Int(recentBG.asMmolL) // convert to mmol/l for calculation
 
         switch recentBG {
-            case 73 ... 144:
-                return .loopGreen
-            case 63 ... 72,
-                 145 ... 180:
-                return .loopYellow
-            case 54 ... 62,
-                 181 ... 207:
-                return .loopOrange
-            default:
-                return .loopRed
+        case 73 ... 144:
+            return .loopGreen
+        case 63 ... 72,
+             145 ... 180:
+            return .loopYellow
+        case 54 ... 62,
+             181 ... 207:
+            return .loopOrange
+        default:
+            return .loopRed
         }
     }
 

+ 6 - 4
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -204,10 +204,11 @@ extension Home {
                     header
                         .frame(maxHeight: 70)
                         .padding(.top, geo.safeAreaInsets.top)
-//                        .background(Color.gray.opacity(0.2))
+                        .background(Color.gray.opacity(0.05))
+                    //  .background(Color.gray.opacity(0.2))
 
                     infoPanal
-                        .background(Color.gray.opacity(0.2))
+                        .background(Color.backgroundColor)
                     MainChartView(
                         glucose: $viewModel.glucose,
                         suggestion: $viewModel.suggestion,
@@ -223,13 +224,14 @@ extension Home {
                         timerDate: $viewModel.timerDate,
                         units: $viewModel.units
                     )
+                    .background(Color.gray.opacity(0.05))
                     .padding(.bottom)
                     .modal(for: .dataTable, from: self)
 
                     legendPanal
-                        .background(Color.gray.opacity(0.2))
+                        .background(Color.backgroundColor)
                     ZStack {
-                        Rectangle().fill(Color.backgroundColor).frame(height: 50 + geo.safeAreaInsets.bottom)
+                        Rectangle().fill(Color.gray.opacity(0.05)).frame(height: 50 + geo.safeAreaInsets.bottom)
                         HStack {
                             Button { viewModel.showModal(for: .addCarbs) }
                             label: {