HomeRootView.swift 893 B

123456789101112131415161718192021222324252627282930
  1. import SwiftUI
  2. extension Home {
  3. struct RootView: BaseView {
  4. @EnvironmentObject var viewModel: ViewModel<Provider>
  5. var body: some View {
  6. VStack {
  7. Spacer()
  8. Button(action: viewModel.runOpenAPS) {
  9. Text("Run test")
  10. .frame(maxWidth: .infinity)
  11. .foregroundColor(.white)
  12. .buttonBackground()
  13. }
  14. Button(action: viewModel.makeProfiles) {
  15. Text("Make profiles")
  16. .frame(maxWidth: .infinity)
  17. .foregroundColor(.white)
  18. .buttonBackground()
  19. }
  20. Spacer()
  21. }
  22. .padding()
  23. .navigationTitle("Home")
  24. .navigationBarTitleDisplayMode(.automatic)
  25. }
  26. }
  27. }