UncertaintyRecoveredView.swift 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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(String(format: LocalizedString("%1$@ 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 %2$@ normally now.", comment: "Text body for page showing insulin uncertainty has been recovered (1: appName) (2: appName)"), self.appName, self.appName))
  16. .padding([.top, .bottom])
  17. }) {
  18. VStack {
  19. Button(action: {
  20. self.didFinish?()
  21. }) {
  22. Text(LocalizedString("Continue", comment: "Button title to continue"))
  23. .actionButtonStyle()
  24. .padding()
  25. }
  26. }
  27. }
  28. .navigationBarTitle(Text("Comms Recovered"), displayMode: .large)
  29. .navigationBarBackButtonHidden(true)
  30. }
  31. }
  32. struct UncertaintyRecoveredView_Previews: PreviewProvider {
  33. static var previews: some View {
  34. UncertaintyRecoveredView(appName: "Test App")
  35. }
  36. }