SensorAgeAlarmEditor.swift 922 B

1234567891011121314151617181920212223242526272829303132333435
  1. // LoopFollow
  2. // SensorAgeAlarmEditor.swift
  3. import SwiftUI
  4. struct SensorAgeAlarmEditor: View {
  5. @Binding var alarm: Alarm
  6. var body: some View {
  7. Group {
  8. InfoBanner(
  9. text: "Warn me this many hours before the sensor’s 10-day change-over.",
  10. alarmType: alarm.type
  11. )
  12. AlarmGeneralSection(alarm: $alarm)
  13. AlarmStepperSection(
  14. header: "Early Reminder",
  15. footer: "Number of hours before the 10-day mark that the alert " +
  16. "will fire.",
  17. title: "Reminder Time",
  18. range: 1 ... 24,
  19. step: 1,
  20. unitLabel: "hours",
  21. value: $alarm.threshold
  22. )
  23. AlarmActiveSection(alarm: $alarm)
  24. AlarmAudioSection(alarm: $alarm)
  25. AlarmSnoozeSection(alarm: $alarm)
  26. }
  27. }
  28. }