how it works to top bar

This commit is contained in:
Diogo
2024-10-18 11:34:54 +01:00
parent da71ecdc28
commit 140609317a
2 changed files with 8 additions and 15 deletions
@@ -13,7 +13,7 @@ struct OnboardingView: View {
var body: some View {
switch onboarding {
case .step1_SimpleXInfo: SimpleXInfo(onboarding: true)
case .step1_SimpleXInfo: NavigationView { SimpleXInfo(onboarding: true) }
case .step2_CreateProfile: CreateFirstProfile()
case .step3_CreateSimpleXAddress: CreateSimpleXAddress()
case .step4_SetNotificationsMode: SetNotificationsMode()
@@ -12,7 +12,6 @@ import SimpleXChat
struct SimpleXInfo: View {
@EnvironmentObject var m: ChatModel
@Environment(\.colorScheme) var colorScheme: ColorScheme
@State private var showHowItWorks = false
var onboarding: Bool
var body: some View {
@@ -55,19 +54,16 @@ struct SimpleXInfo: View {
.padding(.bottom, 8)
.frame(maxWidth: .infinity)
}
Button {
showHowItWorks = true
} label: {
Label("How it works", systemImage: "info.circle")
.font(.subheadline)
}
.padding(.bottom, 8)
.frame(maxWidth: .infinity)
}
.frame(minHeight: g.size.height)
}
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
InfoSheetButton {
HowItWorks(onboarding: onboarding)
}
}
}
.sheet(isPresented: Binding(
get: { m.migrationState != nil },
set: { _ in
@@ -82,9 +78,6 @@ struct SimpleXInfo: View {
.modifier(ThemedBackground(grouped: true))
}
}
.sheet(isPresented: $showHowItWorks) {
HowItWorks(onboarding: onboarding)
}
}
.frame(maxHeight: .infinity)
.padding()