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

move temp target to side panel

polscm32 2 лет назад
Родитель
Сommit
e9f6b27c69

+ 2 - 21
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -486,27 +486,6 @@ extension Home {
                     }
                     }
                     .foregroundColor((state.isTempTargetActive || (overrideString != nil)) ? Color.purple : colorIcon)
                     .foregroundColor((state.isTempTargetActive || (overrideString != nil)) ? Color.purple : colorIcon)
                     .buttonStyle(.borderless)
                     .buttonStyle(.borderless)
-                    /*  Spacer()
-                     Button { state.showModal(for: .statistics)
-                      }
-                      label: {
-                          Image(systemName: "chart.bar")
-                              .font(.system(size: 24))
-                              .foregroundColor(colorIcon)
-                              .padding(8)
-                      }
-                      .foregroundColor(colorIcon)
-                      .buttonStyle(.borderless)
-                      Spacer()
-                      Button { state.showModal(for: .settings) }
-                      label: {
-                          Image(systemName: "gear")
-                              .font(.system(size: 24))
-                              .foregroundColor(colorIcon)
-                              .padding(8)
-                      }
-                      .foregroundColor(colorIcon)
-                      .buttonStyle(.borderless)*/
                 }
                 }
                 .padding(.horizontal, 24)
                 .padding(.horizontal, 24)
                 .padding(.bottom, 16)
                 .padding(.bottom, 16)
@@ -806,6 +785,8 @@ extension Home {
                     }
                     }
                 }, systemName: "textformat.123", title: "CGM")
                 }, systemName: "textformat.123", title: "CGM")
 
 
+                menuElements(action: { state.showModal(for: .addTempTarget) }, systemName: "target", title: "Temp targets")
+
                 menuElements(action: { state.showModal(for: .settings) }, systemName: "gear", title: "Settings")
                 menuElements(action: { state.showModal(for: .settings) }, systemName: "gear", title: "Settings")
 
 
                 /* HStack {
                 /* HStack {

+ 2 - 19
FreeAPS/Sources/Modules/OverrideProfilesConfig/View/OverrideProfilesRootView.swift

@@ -20,7 +20,7 @@ extension OverrideProfilesConfig {
             colorScheme == .dark ? LinearGradient(
             colorScheme == .dark ? LinearGradient(
                 gradient: Gradient(colors: [
                 gradient: Gradient(colors: [
                     Color.bgDarkBlue,
                     Color.bgDarkBlue,
-                   Color.bgDarkerDarkBlue
+                    Color.bgDarkerDarkBlue
                 ]),
                 ]),
                 startPoint: .top,
                 startPoint: .top,
                 endPoint: .bottom
                 endPoint: .bottom
@@ -268,24 +268,7 @@ extension OverrideProfilesConfig {
                     }
                     }
                 }
                 }
 
 
-                header: {
-                    HStack {
-                        Text("Insulin")
-                        Spacer()
-
-                        Button {
-                            state.showModal(for: .addTempTarget)
-                        } label: {
-                            HStack {
-                                Image(systemName: "plus.circle.fill")
-                                    .font(.system(size: 20))
-                                Text("add temp target")
-                                    .font(.caption)
-                                    .foregroundStyle(Color.blue)
-                            }
-                        }
-                    }
-                }
+                header: { Text("Insulin") }
                 footer: {
                 footer: {
                     Text(
                     Text(
                         "Your profile basal insulin will be adjusted with the override percentage and your profile ISF and CR will be inversly adjusted with the percentage."
                         "Your profile basal insulin will be adjusted with the override percentage and your profile ISF and CR will be inversly adjusted with the percentage."