UncertaintyRecoveredView.swift 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // UncertaintyRecoveredView.swift
  3. // OmniKit
  4. //
  5. // Created by Pete Schwamb on 8/25/20.
  6. // Copyright © 2021 LoopKit Authors. All rights reserved.
  7. //
  8. import SwiftUI
  9. import LoopKitUI
  10. struct UncertaintyRecoveredView: View {
  11. var appName: String
  12. var didFinish: (() -> Void)?
  13. var body: some View {
  14. GuidePage(content: {
  15. Text("\(self.appName) has recovered communication with the pod on your body.\n\nInsulin delivery records have been updated and should match what has actually been delivered.\n\nYou may continue to use \(self.appName) normally now.")
  16. .fixedSize(horizontal: false, vertical: true)
  17. .padding([.top, .bottom])
  18. }) {
  19. VStack {
  20. Button(action: {
  21. self.didFinish?()
  22. }) {
  23. Text(LocalizedString("Continue", comment: "Button title to continue"))
  24. .actionButtonStyle()
  25. .padding()
  26. }
  27. }
  28. }
  29. .navigationBarTitle(Text("Comms Recovered"), displayMode: .large)
  30. .navigationBarBackButtonHidden(true)
  31. }
  32. }
  33. struct UncertaintyRecoveredView_Previews: PreviewProvider {
  34. static var previews: some View {
  35. UncertaintyRecoveredView(appName: "Test App")
  36. }
  37. }