generated from StanfordSpezi/SpeziTemplateApplication
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# *PDF minor updates* ## ♻️ Current situation & Problem PDF now on nav stack This PR is in progress! ## 📝 Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md).
- Loading branch information
Showing
5 changed files
with
51 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,10 +69,10 @@ struct HomeView: View { | |
static var accountEnabled: Bool { | ||
!FeatureFlags.disableFirebase && !FeatureFlags.skipOnboarding | ||
} | ||
|
||
@State private var presentingAccount = false | ||
@State private var showSettings = false | ||
|
||
@Environment(NavigationPathWrapper.self) private var navigationPath | ||
@Environment(DataStore.self) private var data | ||
|
||
|
@@ -96,11 +96,11 @@ struct HomeView: View { | |
.foregroundColor(.gray) | ||
} | ||
} | ||
|
||
var body: some View { | ||
@Bindable var navigationPath = navigationPath | ||
@Bindable var data = data | ||
|
||
NavigationStack(path: $navigationPath.path) { | ||
VStack { | ||
Spacer() | ||
|
@@ -109,11 +109,11 @@ struct HomeView: View { | |
Spacer() | ||
StartButton(navigationPath: $navigationPath.path) | ||
} | ||
|
||
.toolbar { | ||
SettingsButton(showSettings: $showSettings) | ||
SettingsButton(showSettings: $showSettings) | ||
} | ||
|
||
.navigationDestination(for: NavigationViews.self) { view in | ||
switch view { | ||
case .smoking: SmokingHistoryView() | ||
|
@@ -139,13 +139,10 @@ struct HomeView: View { | |
.sheet(isPresented: $showSettings) { | ||
SettingsView() | ||
} | ||
// comment out below for pdf testing | ||
.accountRequired(Self.accountEnabled) { | ||
AccountSheet() | ||
} | ||
.verifyRequiredAccountDetails(Self.accountEnabled) | ||
|
||
// comment out above for pdf testing | ||
} | ||
} | ||
|
||
|
@@ -154,7 +151,7 @@ struct HomeView: View { | |
let details = AccountDetails.Builder() | ||
.set(\.userId, value: "[email protected]") | ||
.set(\.name, value: PersonNameComponents(givenName: "Leland", familyName: "Stanford")) | ||
|
||
return HomeView() | ||
.previewWith(standard: IntakeStandard()) { | ||
IntakeScheduler() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters