QuickBolusInfoView.swift 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import SwiftUI
  2. struct QuickBolusInfoView: View {
  3. @Binding var isPresented: Bool
  4. var body: some View {
  5. NavigationStack {
  6. ScrollView {
  7. Text(String(
  8. localized: "Quick Bolus looks at your manual boluses from the past 90 days and suggests the amounts you most commonly enact at this time of day.\n\nIt gives more weight to boluses from similar times of day, and treats weekdays and weekends separately. Older entries gradually count less.\n\nTap a suggestion to select it, then slide to confirm. Your normal Face ID or Touch ID approval always applies.",
  9. comment: "Info sheet body explaining how quick bolus scoring works"
  10. ))
  11. .padding()
  12. }
  13. .navigationTitle(String(
  14. localized: "About Quick Bolus",
  15. comment: "Info sheet title for quick bolus feature"
  16. ))
  17. .navigationBarTitleDisplayMode(.inline)
  18. Button {
  19. isPresented = false
  20. } label: {
  21. Text("Got it!", comment: "Dismiss button for Quick Bolus info sheet")
  22. .bold()
  23. .frame(maxWidth: .infinity, minHeight: 30, alignment: .center)
  24. }
  25. .buttonStyle(.bordered)
  26. .padding([.horizontal, .bottom])
  27. .padding(.top, 4)
  28. }
  29. .presentationDetents([.medium])
  30. }
  31. }