mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-03 14:46:56 +02:00
Add effects to the congratulations screen when personalisation is disabled.
Improve the API of the EffectsView to make it more swifty.
This commit is contained in:
+8
@@ -54,6 +54,7 @@ struct OnboardingCongratulationsScreen: View {
|
||||
maxHeight: OnboardingConstants.maxContentHeight)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
.overlay(effects.ignoresSafeArea())
|
||||
.background(theme.colors.accent.ignoresSafeArea())
|
||||
.accentColor(.white)
|
||||
.navigationBarHidden(true)
|
||||
@@ -120,6 +121,13 @@ struct OnboardingCongratulationsScreen: View {
|
||||
.buttonStyle(PrimaryActionButtonStyle(customColor: .white))
|
||||
.accessibilityIdentifier("homeButton")
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
var effects: some View {
|
||||
if viewModel.viewState.personalizationDisabled {
|
||||
EffectsView(effectsType: .confetti)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Previews
|
||||
|
||||
Reference in New Issue
Block a user