Files
simplex-chat/apps/ios/Shared/Views/Onboarding/OnboardingView.swift
T
Evgeny 3d85480944 ui: new onboarding (#6888)
* ui: onboarding assets

* android: fix gradle version check, pass assets dir to builds

* desktop: pass assets dir to gradle builds

* ui: new onboarding (#6872)

* ios: improve onboarding

* ios version condition

* android strings

* merge keys

* refactor network conditions to old location

* ios scroll headline

* remove nav view

* kotlin: refactor network commitments page to use existing view

* remove unused keys

* update why page

* configure -> setup

* padding for app bar in why page

* fix why page

* padding

* copy translations from the website

* export localizations

* export again

* kotlin: fix why page

* fix

* import localizations

* custom layout

* padding for system bars

* paddings

* more paddings

* more padding 2

* update fonts

* fonts

* line height, padding

* paddings

* refactor notifications

* refactor ios

* notification icons in cards

* restore profile field

* padding

* desktop layout create profile

* fix

* more layout

* create profile layout

* mobile padding

* split mobile and desktop

* layout

* layout

* background

* refactor onboarding images

* use DARK theme by default

* page 3 and 4 layouts

* restructure desktop onboarding to two panes

* improve layout

* improve

* fonts, padding

* link mobile on full page

* fix, reduce noise

* change to animation

* fix animation

* refactor

* colors, animation

* import

* details

* fix padding

* fix icon

* fix

* button paddings

* accept button on terms page

* fix conditions button

* close modal

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
Co-authored-by: shum <github.shum@liber.li>
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-04-27 11:46:08 +01:00

64 lines
2.0 KiB
Swift

//
// OnboardingStepsView.swift
// SimpleX (iOS)
//
// Created by Evgeny on 07/05/2022.
// Copyright © 2022 SimpleX Chat. All rights reserved.
//
// Spec: spec/client/navigation.md
import SwiftUI
// Spec: spec/client/navigation.md#OnboardingView
struct OnboardingView: View {
var onboarding: OnboardingStage
var body: some View {
NavigationView {
switch onboarding {
case .step1_SimpleXInfo:
SimpleXInfo(onboarding: true)
.modifier(ThemedBackground())
case .step2_CreateProfile:
CreateFirstProfile()
.modifier(ThemedBackground())
case .step3_CreateSimpleXAddress: // deprecated
CreateSimpleXAddress()
case .step3_ChooseServerOperators,
.step4_SetNotificationsMode: // deprecated
YourNetworkView()
.navigationBarBackButtonHidden(true)
.modifier(ThemedBackground())
case .step4_NetworkCommitments:
OnboardingConditionsView(selectedOperatorIds: Set(ChatModel.shared.conditions.serverOperators.filter { $0.enabled }.map { $0.operatorId }))
.navigationBarBackButtonHidden(true)
.modifier(ThemedBackground())
case .onboardingComplete: EmptyView()
}
}
}
}
func onboardingButtonPlaceholder() -> some View {
Spacer().frame(height: 40)
}
// Spec: spec/client/navigation.md#onboardingStage
enum OnboardingStage: String, Identifiable {
case step1_SimpleXInfo
case step2_CreateProfile
case step3_CreateSimpleXAddress // deprecated
case step3_ChooseServerOperators
case step4_SetNotificationsMode // deprecated
case step4_NetworkCommitments
case onboardingComplete
public var id: Self { self }
}
struct OnboardingStepsView_Previews: PreviewProvider {
static var previews: some View {
OnboardingView(onboarding: .step1_SimpleXInfo)
}
}