Update welcome screen assets. (#1723)

* Update snapshots.
This commit is contained in:
Doug
2023-09-18 11:07:47 +01:00
committed by GitHub
parent 03603d13e5
commit fd6711bbc7
49 changed files with 198 additions and 1901 deletions
@@ -22,74 +22,15 @@ class PlaceholderScreenCoordinator: CoordinatorProtocol {
}
}
/// The app's splash screen. This screen is shown after the LaunchScreen
/// until the app is ready to show the relevant coordinator. The design of
/// these 2 screens are matched.
/// The screen shown in split view when the detail has no content.
struct PlaceholderScreen: View {
@Environment(\.colorScheme) private var colorScheme
private let outerShape = RoundedRectangle(cornerRadius: 44)
private var isLight: Bool { colorScheme == .light }
var body: some View {
image
.accessibilityHidden(true)
OnboardingLogo(isOnGradient: false)
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background()
.environment(\.backgroundStyle, AnyShapeStyle(Color.compound.bgCanvasDefault))
.ignoresSafeArea(edges: .top)
}
@ViewBuilder
var image: some View {
if isLight {
logo
} else {
darkLogo
}
}
var logo: some View {
Image(asset: Asset.Images.appLogo)
.padding(24)
.background(.white.opacity(0.4))
.clipShape(outerShape)
.background {
outerShape.fill(Color.white)
.shadow(color: Color(red: 0.11, green: 0.11, blue: 0.13).opacity(0.08), radius: 16, y: 8)
outerShape.fill(Color.white)
.shadow(color: Color(red: 0.11, green: 0.11, blue: 0.13).opacity(0.5), radius: 16, y: 8)
.blendMode(.overlay)
}
.overlay {
outerShape
.inset(by: 0.25)
.stroke(.white, lineWidth: 0.5)
}
}
var darkLogo: some View {
Image(asset: Asset.Images.appLogo)
.shadow(color: .black.opacity(0.2), radius: 0.5, y: 2)
.shadow(color: Color(red: 0.05, green: 0.74, blue: 0.55).opacity(0.2), radius: 16)
.padding(24)
.background {
LinearGradient(stops: [.init(color: .white.opacity(0.05), location: 0.00),
.init(color: .white.opacity(0), location: 1.00)],
startPoint: UnitPoint(x: 0, y: 0),
endPoint: UnitPoint(x: 1, y: 1))
.blendMode(.multiply)
}
.clipShape(outerShape)
.shadow(color: .black.opacity(0.9), radius: 80, x: 0, y: 1)
.overlay {
outerShape
.inset(by: 0.25)
.stroke(.white.opacity(0.9), lineWidth: 0.5)
.blendMode(.overlay)
}
}
}
struct PlaceholderScreen_Previews: PreviewProvider {