mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user