AppShortcuts.swift 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import AppIntents
  2. import Foundation
  3. struct AppShortcuts: AppShortcutsProvider {
  4. @AppShortcutsBuilder static var appShortcuts: [AppShortcut] {
  5. AppShortcut(
  6. intent: BolusIntent(),
  7. phrases: [
  8. "\(.applicationName) bolus",
  9. "Enacts a \(.applicationName) Bolus"
  10. ],
  11. shortTitle: "Bolus",
  12. systemImageName: "drop.fill"
  13. )
  14. AppShortcut(
  15. intent: ApplyTempPresetIntent(),
  16. phrases: [
  17. "Activate \(.applicationName) temporary target ?",
  18. "\(.applicationName) apply a temporary target"
  19. ],
  20. shortTitle: "Temporary Target",
  21. systemImageName: "target"
  22. )
  23. AppShortcut(
  24. intent: ListStateIntent(),
  25. phrases: [
  26. "List \(.applicationName) state",
  27. "\(.applicationName) state"
  28. ],
  29. shortTitle: "List State",
  30. systemImageName: "list.bullet"
  31. )
  32. AppShortcut(
  33. intent: AddCarbPresetIntent(),
  34. phrases: [
  35. "Add carbs in \(.applicationName)",
  36. "\(.applicationName) allows to add carbs"
  37. ],
  38. shortTitle: "Add Carbs",
  39. systemImageName: "fork.knife"
  40. )
  41. AppShortcut(
  42. intent: ApplyOverridePresetIntent(),
  43. phrases: [
  44. "Activate \(.applicationName) override",
  45. "Activates an available \(.applicationName) override"
  46. ],
  47. shortTitle: "Activate Override",
  48. systemImageName: "clock.arrow.2.circlepath"
  49. )
  50. AppShortcut(
  51. intent: CancelOverrideIntent(),
  52. phrases: [
  53. "Cancel \(.applicationName) override",
  54. "Cancels an active \(.applicationName) override"
  55. ],
  56. shortTitle: "Cancel Override",
  57. systemImageName: "xmark.circle.fill"
  58. )
  59. }
  60. }