MainView.swift 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import SwiftUI
  2. struct MainView: View {
  3. @StateObject var state = WatchStateModel()
  4. @State var isCarbsActive = false
  5. @State var isTargetsActive = false
  6. @State var isBolusActive = false
  7. var body: some View {
  8. Form {
  9. NavigationLink {
  10. CarbsView()
  11. .environmentObject(state)
  12. } label: {
  13. HStack {
  14. Image("carbs", bundle: nil)
  15. .renderingMode(.template)
  16. .resizable()
  17. .frame(width: 24, height: 24)
  18. .foregroundColor(.loopGreen)
  19. Text("Abb Carbs")
  20. }
  21. }
  22. NavigationLink {
  23. EmptyView()
  24. } label: {
  25. HStack {
  26. Image("target", bundle: nil)
  27. .renderingMode(.template)
  28. .resizable()
  29. .frame(width: 24, height: 24)
  30. .foregroundColor(.loopYellow)
  31. Text("Temp Targets").foregroundColor(.primary)
  32. }
  33. }
  34. NavigationLink {
  35. EmptyView()
  36. } label: {
  37. HStack {
  38. Image("bolus", bundle: nil)
  39. .renderingMode(.template)
  40. .resizable()
  41. .frame(width: 24, height: 24)
  42. .foregroundColor(.insulin)
  43. Text("Enact Bolus")
  44. }
  45. }
  46. }.padding()
  47. }
  48. }
  49. struct ContentView_Previews: PreviewProvider {
  50. static var previews: some View {
  51. MainView()
  52. }
  53. }