BuildExpireAlarmEditor.swift 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // LoopFollow
  2. // BuildExpireAlarmEditor.swift
  3. // Created by Jonas Björkert on 2025-04-26.
  4. import SwiftUI
  5. struct BuildExpireAlarmEditor: View {
  6. @Binding var alarm: Alarm
  7. var body: some View {
  8. Form {
  9. InfoBanner(
  10. text: "Sends a reminder before the looping-app build you’re following reaches its "
  11. + "TestFlight or Xcode expiry date. Currently only works for Trio 0.4 and later."
  12. )
  13. AlarmGeneralSection(alarm: $alarm)
  14. AlarmStepperSection(
  15. footer: "Choose how many days of notice you’d like before the build becomes unusable.",
  16. title: "Expires In",
  17. range: 1 ... 14,
  18. step: 1,
  19. unitLabel: alarm.type.snoozeTimeUnit.label,
  20. value: Binding(
  21. get: { alarm.threshold ?? 1 },
  22. set: { alarm.threshold = $0 }
  23. )
  24. )
  25. AlarmActiveSection(alarm: $alarm)
  26. AlarmAudioSection(alarm: $alarm)
  27. AlarmSnoozeSection(
  28. alarm: $alarm,
  29. range: 1 ... 14,
  30. step: 1
  31. )
  32. }
  33. .navigationTitle(alarm.type.rawValue)
  34. }
  35. }