|
|
@@ -36,7 +36,7 @@ extension AddTempTarget {
|
|
|
}
|
|
|
|
|
|
HStack {
|
|
|
- Text("Advanced")
|
|
|
+ Text("Experimental")
|
|
|
Toggle(isOn: $state.viewPercantage) {}.controlSize(.mini)
|
|
|
Image(systemName: "figure.highintensity.intervaltraining")
|
|
|
Image(systemName: "fork.knife")
|
|
|
@@ -44,7 +44,7 @@ extension AddTempTarget {
|
|
|
|
|
|
if state.viewPercantage {
|
|
|
Section(
|
|
|
- header: Text("Percent Insulin")
|
|
|
+ header: Text("")
|
|
|
) {
|
|
|
VStack {
|
|
|
Slider(
|
|
|
@@ -56,32 +56,31 @@ extension AddTempTarget {
|
|
|
isEditing = editing
|
|
|
}
|
|
|
)
|
|
|
- Text("\(state.percentage.formatted(.number)) %")
|
|
|
- .foregroundColor(isEditing ? .orange : .blue)
|
|
|
- .font(.largeTitle)
|
|
|
+ HStack {
|
|
|
+ Text("Insulin \(state.percentage.formatted(.number)) %")
|
|
|
+ .foregroundColor(isEditing ? .orange : .blue)
|
|
|
+ .font(.largeTitle)
|
|
|
+ }
|
|
|
Divider()
|
|
|
- Text(
|
|
|
- NSLocalizedString("Target glucose", comment: "") +
|
|
|
- (
|
|
|
- state
|
|
|
- .units == .mmolL ?
|
|
|
- ": \(state.computeTarget().asMmolL.formatted(.number.grouping(.never).rounded().precision(.fractionLength(1)))) mmol/L" :
|
|
|
- ": \(state.computeTarget().formatted(.number.grouping(.never).rounded().precision(.fractionLength(0)))) mg/dl"
|
|
|
- )
|
|
|
- )
|
|
|
|
|
|
Slider(
|
|
|
value: $state.hbt,
|
|
|
in: 101 ... 295,
|
|
|
step: 1
|
|
|
- )
|
|
|
- Text(
|
|
|
- state
|
|
|
- .units == .mgdL ? "Half normal Basal at: \(state.hbt.formatted(.number)) mg/dl" :
|
|
|
- "Half normal Basal at: \(state.hbt.asMmolL.formatted(.number.grouping(.never).rounded().precision(.fractionLength(1)))) mmol/L"
|
|
|
- )
|
|
|
- .foregroundColor(.secondary)
|
|
|
- .font(.caption).italic()
|
|
|
+ ).accentColor(.green)
|
|
|
+
|
|
|
+ HStack {
|
|
|
+ Text(
|
|
|
+ NSLocalizedString("Target glucose", comment: "") +
|
|
|
+ (
|
|
|
+ state
|
|
|
+ .units == .mmolL ?
|
|
|
+ ": \(state.computeTarget().asMmolL.formatted(.number.grouping(.never).rounded().precision(.fractionLength(1)))) mmol/L" :
|
|
|
+ ": \(state.computeTarget().formatted(.number.grouping(.never).rounded().precision(.fractionLength(0)))) mg/dl"
|
|
|
+ )
|
|
|
+ )
|
|
|
+ .foregroundColor(.green)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} else {
|