| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- // LoopFollow
- // BatteryDropAlarmEditor.swift
- import SwiftUI
- struct BatteryDropAlarmEditor: View {
- @Binding var alarm: Alarm
- var body: some View {
- Group {
- InfoBanner(
- text: "This warns you if your phone’s battery drops quickly, based on the percentage and time you set.",
- alarmType: alarm.type
- )
- AlarmGeneralSection(alarm: $alarm)
- AlarmStepperSection(
- header: String(localized: "Phone Battery Drop"),
- footer: String(localized: "This alerts you if the phone battery drops by this much or more."),
- title: String(localized: "Drop Amount"),
- range: 5 ... 100,
- step: 5,
- unitLabel: "%",
- value: $alarm.delta
- )
- AlarmStepperSection(
- header: String(localized: "Over This Time"),
- footer: String(localized: "How far back to look for that drop."),
- title: String(localized: "Time Window"),
- range: 5 ... 30,
- step: 5,
- unitLabel: String(localized: "min"),
- value: $alarm.monitoringWindow
- )
- AlarmActiveSection(alarm: $alarm)
- AlarmAudioSection(alarm: $alarm)
- AlarmSnoozeSection(alarm: $alarm)
- }
- }
- }
|