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

Account details update: made email & DoB mandatory and updated onboarding texts #5

Merged
merged 10 commits into from
Jan 24, 2024
17 changes: 12 additions & 5 deletions Behavior/Account/AccountSetupHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,23 @@
var body: some View {
VStack {
Text("ACCOUNT_TITLE")
.font(.largeTitle)
.bold()
.padding(.bottom)
.padding(.top, 30)
.font(.largeTitle)
.bold()
.padding(.bottom)
.padding(.top, 30)

Check warning on line 25 in Behavior/Account/AccountSetupHeader.swift

View check run for this annotation

Codecov / codecov/patch

Behavior/Account/AccountSetupHeader.swift#L21-L25

Added lines #L21 - L25 were not covered by tests
Text("ACCOUNT_SUBTITLE")
.padding(.bottom, 8)
Divider()

Check warning on line 28 in Behavior/Account/AccountSetupHeader.swift

View check run for this annotation

Codecov / codecov/patch

Behavior/Account/AccountSetupHeader.swift#L28

Added line #L28 was not covered by tests
if account.signedIn, case .generic = setupState {
Text("ACCOUNT_SIGNED_IN_DESCRIPTION")
.padding()

Check warning on line 31 in Behavior/Account/AccountSetupHeader.swift

View check run for this annotation

Codecov / codecov/patch

Behavior/Account/AccountSetupHeader.swift#L31

Added line #L31 was not covered by tests
} else {
Text("ACCOUNT_SETUP_DESCRIPTION")
VStack {
Text("ACCOUNT_SETUP_DESCRIPTION")
Text("ACCOUNT_REQUIRED_ITEMS")
}
.padding()

Check warning on line 37 in Behavior/Account/AccountSetupHeader.swift

View check run for this annotation

Codecov / codecov/patch

Behavior/Account/AccountSetupHeader.swift#L33-L37

Added lines #L33 - L37 were not covered by tests
}
}
.multilineTextAlignment(.center)
Expand Down
2 changes: 1 addition & 1 deletion Behavior/Account/AccountSheet.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// This source file is part of the Behavior based on the Stanford Spezi Template Application project
// This source file is part of the Stanford Spezi Template Application open-source project
EvelynBunnyDev marked this conversation as resolved.
Show resolved Hide resolved
//
// SPDX-FileCopyrightText: 2023 Stanford University
//
Expand Down
3 changes: 2 additions & 1 deletion Behavior/BehaviorDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ class BehaviorDelegate: SpeziAppDelegate {
AccountConfiguration(configuration: [
.requires(\.userId),
.requires(\.name),
.requires(\.dateOfBirth),

// additional values stored using the `FirestoreAccountStorage` within our Standard implementation
.collects(\.genderIdentity),
.collects(\.dateOfBirth)
.collects(\.email)
EvelynBunnyDev marked this conversation as resolved.
Show resolved Hide resolved
])

if FeatureFlags.useFirebaseEmulator {
Expand Down
17 changes: 14 additions & 3 deletions Behavior/Resources/Localizable.xcstrings
EvelynBunnyDev marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,23 @@
}
}
},
"ACCOUNT_REQUIRED_ITEMS" : {
"extractionState" : "automatic",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Email, Name, and Date of Birth are required."
}
}
}
},
"ACCOUNT_SETUP_DESCRIPTION" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "You may login to your existing account. Or create a new one if you don't have one already."
"value" : "Login to your existing account, or create one if you are new! "
}
}
}
Expand All @@ -26,7 +37,7 @@
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "You are already logged in with the account shown below. Continue or change your account by logging out."
"value" : "You are logged in!"
}
}
}
Expand Down Expand Up @@ -542,4 +553,4 @@
}
},
"version" : "1.0"
}
}