StartupExistingUserStepView.swift 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // StartupGuideStepView.swift
  3. // Trio
  4. //
  5. // Created by Cengiz Deniz on 06.04.25.
  6. //
  7. import SwiftUI
  8. struct StartupGuideStepView: View {
  9. @Bindable var state: Onboarding.StateModel
  10. @Environment(\.openURL) var openURL
  11. var body: some View {
  12. VStack(alignment: .leading, spacing: 20) {
  13. Text("Before you begin…")
  14. .padding(.horizontal)
  15. .font(.title3)
  16. .bold()
  17. VStack(alignment: .leading, spacing: 10) {
  18. BulletPoint(String(localized: "Take a deep breath — you've got this."))
  19. BulletPoint(String(localized: "There's no rush. Take all the time you need."))
  20. BulletPoint(String(localized: "Everything you enter here can be adjusted later in the app."))
  21. BulletPoint(String(localized: "Want a hand? You can open our full Startup Guide here:"))
  22. Button {
  23. openURL(URL(string: "https://triodocs.org/startup-guide")!)
  24. } label: {
  25. Text("https://triodocs.org/startup-guide")
  26. .padding(.horizontal, 12)
  27. .padding(.vertical, 8)
  28. .background(Color.blue.opacity(0.2))
  29. .cornerRadius(8)
  30. }
  31. .frame(maxWidth: .infinity, alignment: .center)
  32. .padding(.horizontal)
  33. }.padding(.horizontal)
  34. VStack(alignment: .leading, spacing: 10) {
  35. Text("Already using Trio and updating from an older version?").bold()
  36. BulletPoint(String(localized: "Your therapy settings, pump, and CGM configurations will be carried over."))
  37. BulletPoint(
  38. String(
  39. localized: "Your algorithm settings (previously called \"OpenAPS settings\") will be reset to defaults."
  40. )
  41. )
  42. BulletPoint(String(localized: "We recommend reviewing them carefully — Trio will guide you step-by-step."))
  43. }.padding(.horizontal)
  44. VStack(alignment: .leading, spacing: 10) {
  45. Text("One last thing, before you begin...").bold()
  46. HStack {
  47. Text("You can pause at any time. Just be aware: if you ")
  48. + Text("force quit").bold()
  49. + Text(" the app before finishing onboarding, ")
  50. + Text("your progress will not be saved.").bold()
  51. }
  52. }.multilineTextAlignment(.leading)
  53. .padding(.horizontal)
  54. Divider()
  55. Toggle(isOn: $state.hasReadImportantStartupNotes) {
  56. Text("Got it! I'm ready to continue.").padding(.leading, 6).bold()
  57. }
  58. .toggleStyle(CheckboxToggleStyle(tint: Color.blue))
  59. .padding(.horizontal)
  60. }
  61. }
  62. }