|
|
@@ -26,12 +26,11 @@ extension StatConfig {
|
|
|
|
|
|
var body: some View {
|
|
|
Form {
|
|
|
- Section(header: Text("Settings")) {
|
|
|
+ Section {
|
|
|
Toggle("Change HbA1c Unit", isOn: $state.overrideHbA1cUnit)
|
|
|
Toggle("Display Chart X - Grid lines", isOn: $state.xGridLines)
|
|
|
Toggle("Display Chart Y - Grid lines", isOn: $state.yGridLines)
|
|
|
Toggle("Display Chart Threshold lines for Low and High", isOn: $state.rulerMarks)
|
|
|
- Toggle("Standing / Laying TIR Chart", isOn: $state.oneDimensionalGraph)
|
|
|
|
|
|
HStack {
|
|
|
Text("Hours X-Axis (6 default)")
|
|
|
@@ -39,7 +38,10 @@ extension StatConfig {
|
|
|
DecimalTextField("6", value: $state.hours, formatter: carbsFormatter)
|
|
|
Text("hours").foregroundColor(.secondary)
|
|
|
}
|
|
|
+ } header: { Text("Home Chart Settings") }
|
|
|
|
|
|
+ Section {
|
|
|
+ Toggle("Standing / Laying TIR Chart", isOn: $state.oneDimensionalGraph)
|
|
|
HStack {
|
|
|
Text("Low")
|
|
|
Spacer()
|
|
|
@@ -53,10 +55,21 @@ extension StatConfig {
|
|
|
DecimalTextField("0", value: $state.high, formatter: glucoseFormatter)
|
|
|
Text(state.units.rawValue).foregroundColor(.secondary)
|
|
|
}
|
|
|
- }
|
|
|
+ } header: { Text("Statistics") }
|
|
|
+
|
|
|
+ Section {
|
|
|
+ Picker(
|
|
|
+ selection: $state.lockScreenView,
|
|
|
+ label: Text("Lock screen widget")
|
|
|
+ ) {
|
|
|
+ ForEach(LockScreenView.allCases) { selection in
|
|
|
+ Text(selection.displayName).tag(selection)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } header: { Text("Lock screen widget") }
|
|
|
}
|
|
|
.onAppear(perform: configureView)
|
|
|
- .navigationBarTitle("Statistics")
|
|
|
+ .navigationBarTitle("UI/UX")
|
|
|
.navigationBarTitleDisplayMode(.automatic)
|
|
|
}
|
|
|
}
|