|
@@ -46,7 +46,8 @@ extension Home {
|
|
|
CurrentGlucoseView(
|
|
CurrentGlucoseView(
|
|
|
recentGlucose: $viewModel.recentGlucose,
|
|
recentGlucose: $viewModel.recentGlucose,
|
|
|
delta: $viewModel.glucoseDelta,
|
|
delta: $viewModel.glucoseDelta,
|
|
|
- units: $viewModel.units
|
|
|
|
|
|
|
+ units: $viewModel.units,
|
|
|
|
|
+ eventualBG: $viewModel.eventualBG
|
|
|
)
|
|
)
|
|
|
.onTapGesture {
|
|
.onTapGesture {
|
|
|
viewModel.openCGM()
|
|
viewModel.openCGM()
|
|
@@ -155,27 +156,37 @@ extension Home {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
var legendPanal: some View {
|
|
var legendPanal: some View {
|
|
|
- HStack(alignment: .firstTextBaseline) {
|
|
|
|
|
- Circle().fill(Color.loopGreen).frame(width: 8, height: 8)
|
|
|
|
|
- .padding(.leading, 8)
|
|
|
|
|
- Text("BG")
|
|
|
|
|
- .font(.system(size: 12, weight: .bold)).foregroundColor(.loopGreen)
|
|
|
|
|
- Circle().fill(Color.insulin).frame(width: 8, height: 8)
|
|
|
|
|
- .padding(.leading, 8)
|
|
|
|
|
- Text("IOB")
|
|
|
|
|
- .font(.system(size: 12, weight: .bold)).foregroundColor(.insulin)
|
|
|
|
|
- Circle().fill(Color.zt).frame(width: 8, height: 8)
|
|
|
|
|
- .padding(.leading, 8)
|
|
|
|
|
- Text("ZT")
|
|
|
|
|
- .font(.system(size: 12, weight: .bold)).foregroundColor(.zt)
|
|
|
|
|
- Circle().fill(Color.loopYellow).frame(width: 8, height: 8)
|
|
|
|
|
- .padding(.leading, 8)
|
|
|
|
|
- Text("COB")
|
|
|
|
|
- .font(.system(size: 12, weight: .bold)).foregroundColor(.loopYellow)
|
|
|
|
|
- Circle().fill(Color.uam).frame(width: 8, height: 8)
|
|
|
|
|
- .padding(.leading, 8)
|
|
|
|
|
- Text("UAM")
|
|
|
|
|
- .font(.system(size: 12, weight: .bold)).foregroundColor(.uam)
|
|
|
|
|
|
|
+ HStack(alignment: .center) {
|
|
|
|
|
+ Group {
|
|
|
|
|
+ Circle().fill(Color.loopGreen).frame(width: 8, height: 8)
|
|
|
|
|
+ .padding(.leading, 8)
|
|
|
|
|
+ Text("BG")
|
|
|
|
|
+ .font(.system(size: 12, weight: .bold)).foregroundColor(.loopGreen)
|
|
|
|
|
+ }
|
|
|
|
|
+ Group {
|
|
|
|
|
+ Circle().fill(Color.insulin).frame(width: 8, height: 8)
|
|
|
|
|
+ .padding(.leading, 8)
|
|
|
|
|
+ Text("IOB")
|
|
|
|
|
+ .font(.system(size: 12, weight: .bold)).foregroundColor(.insulin)
|
|
|
|
|
+ }
|
|
|
|
|
+ Group {
|
|
|
|
|
+ Circle().fill(Color.zt).frame(width: 8, height: 8)
|
|
|
|
|
+ .padding(.leading, 8)
|
|
|
|
|
+ Text("ZT")
|
|
|
|
|
+ .font(.system(size: 12, weight: .bold)).foregroundColor(.zt)
|
|
|
|
|
+ }
|
|
|
|
|
+ Group {
|
|
|
|
|
+ Circle().fill(Color.loopYellow).frame(width: 8, height: 8)
|
|
|
|
|
+ .padding(.leading, 8)
|
|
|
|
|
+ Text("COB")
|
|
|
|
|
+ .font(.system(size: 12, weight: .bold)).foregroundColor(.loopYellow)
|
|
|
|
|
+ }
|
|
|
|
|
+ Group {
|
|
|
|
|
+ Circle().fill(Color.uam).frame(width: 8, height: 8)
|
|
|
|
|
+ .padding(.leading, 8)
|
|
|
|
|
+ Text("UAM")
|
|
|
|
|
+ .font(.system(size: 12, weight: .bold)).foregroundColor(.uam)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
.frame(maxWidth: .infinity, maxHeight: 30)
|
|
.frame(maxWidth: .infinity, maxHeight: 30)
|
|
|
}
|
|
}
|