|
|
@@ -24,6 +24,7 @@ extension BasalProfileEditor {
|
|
|
private var rateFormatter: NumberFormatter {
|
|
|
let formatter = NumberFormatter()
|
|
|
formatter.numberStyle = .decimal
|
|
|
+
|
|
|
return formatter
|
|
|
}
|
|
|
|
|
|
@@ -140,6 +141,20 @@ extension BasalProfileEditor {
|
|
|
.foregroundColor(.secondary)
|
|
|
}
|
|
|
}.listRowBackground(Color.chart)
|
|
|
+
|
|
|
+ Section {} header: {
|
|
|
+ VStack(alignment: .leading, spacing: 10) {
|
|
|
+ HStack {
|
|
|
+ Image(systemName: "note.text.badge.plus").foregroundStyle(.primary)
|
|
|
+ Text("Add an entry by tapping 'Add Rate +' in the top right-hand corner of the screen.")
|
|
|
+ }
|
|
|
+ HStack {
|
|
|
+ Image(systemName: "hand.draw.fill").foregroundStyle(.primary)
|
|
|
+ Text("Swipe to delete a single entry. Tap on it, to edit its time or rate.")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .textCase(nil)
|
|
|
+ }
|
|
|
}
|
|
|
.safeAreaInset(edge: .bottom, spacing: 30) { saveButton }
|
|
|
.alert(isPresented: $state.showAlert) {
|
|
|
@@ -163,7 +178,12 @@ extension BasalProfileEditor {
|
|
|
}
|
|
|
}
|
|
|
ToolbarItem(placement: .topBarTrailing) {
|
|
|
- Button(action: { state.add() }) { Image(systemName: "plus") }.disabled(!state.canAdd)
|
|
|
+ Button(action: { state.add() }) {
|
|
|
+ HStack {
|
|
|
+ Text("Add Rate")
|
|
|
+ Image(systemName: "plus")
|
|
|
+ }
|
|
|
+ }.disabled(!state.canAdd)
|
|
|
}
|
|
|
})
|
|
|
.environment(\.editMode, $editMode)
|