Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect WelcomeView and WelcomeViewAddVehicle to App Flow #301

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
maartinj marked this conversation as resolved.
Show resolved Hide resolved
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x00",
"green" : "0x00",
"red" : "0x00"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x00",
"green" : "0x00",
"red" : "0x00"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
12 changes: 6 additions & 6 deletions Basic-Car-Maintenance/Shared/BasicCarMaintenanceApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ struct BasicCarMaintenanceApp: App {
@State private var actionService = ActionService.shared
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate

// Logic to load Onboarding screen when app was first launched
// @AppStorage("isFirstTime") private var isFirstTime: Bool = true
// Logic to load OnboardingScreen when app first launch
@AppStorage("isFirstTime") private var isFirstTime: Bool = true

var body: some Scene {
WindowGroup {
Expand All @@ -28,10 +28,10 @@ struct BasicCarMaintenanceApp: App {
.task {
try? Tips.configure()
}
// .sheet(isPresented: $isFirstTime) {
// WelcomeView()
// .interactiveDismissDisabled()
// }
.sheet(isPresented: $isFirstTime) {
WelcomeView()
.interactiveDismissDisabled()
}
}
}
}
Expand Down
19 changes: 8 additions & 11 deletions Basic-Car-Maintenance/Shared/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@
}
}
}
},
"about" : {

},
"Add" : {
"comment" : "Label for submit button on form to add an entry",
Expand Down Expand Up @@ -416,7 +413,7 @@
}
}
},
"Add the details below" : {
"Add the details below about " : {

},
"Add Vehicle" : {
Expand Down Expand Up @@ -814,9 +811,6 @@
}
}
}
},
"Back" : {

},
"Basic" : {

Expand Down Expand Up @@ -1800,6 +1794,9 @@
}
}
}
},
"Error" : {

},
"Failed To Add Vehicle" : {
"localizations" : {
Expand Down Expand Up @@ -5005,6 +5002,9 @@
}
}
}
},
"Vehicle %@" : {

},
"Vehicle Color" : {
"localizations" : {
Expand Down Expand Up @@ -5784,9 +5784,6 @@
}
}
}
},
"Welcome 🥳" : {

},
"Welcome to" : {

Expand Down Expand Up @@ -5863,4 +5860,4 @@
}
},
"version" : "1.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import SwiftUI

struct WelcomeView: View {
@State private var authenticationViewModel = AuthenticationViewModel()
maartinj marked this conversation as resolved.
Show resolved Hide resolved

var body: some View {
NavigationView {
Expand Down Expand Up @@ -53,7 +54,8 @@ struct WelcomeView: View {

Spacer(minLength: 10)

NavigationLink(destination: WelcomeViewAddVehicle()) {
NavigationLink(
destination: WelcomeViewAddVehicle(authenticationViewModel: authenticationViewModel)) {
Text("Continue")
.fontWeight(.bold)
.foregroundStyle(.white)
Expand Down
Loading
Loading