SessionStore owns sign-in state, the persisted server URL, and the live OutlineAPIClient; RootView switches between the auth screen and signed-in content and covers the transition with a splash instead of tearing the login UI down abruptly. Drops the SwiftData Item placeholder from the default Xcode template — unused once real content replaced it.
42 lines
1.4 KiB
Swift
42 lines
1.4 KiB
Swift
import SwiftUI
|
|
|
|
/// Full-window cover shown between a successful sign-in and `RootView` revealing the
|
|
/// signed-in content beneath it, so the login form never has to visibly tear down.
|
|
struct WelcomeSplashView: View {
|
|
let name: String
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
Rectangle()
|
|
.fill(.background)
|
|
.ignoresSafeArea()
|
|
|
|
VStack(spacing: 20) {
|
|
ZStack {
|
|
Circle()
|
|
.fill(
|
|
LinearGradient(
|
|
colors: [Color.accentColor, Color.accentColor.opacity(0.6)],
|
|
startPoint: .topLeading,
|
|
endPoint: .bottomTrailing
|
|
)
|
|
)
|
|
.frame(width: 88, height: 88)
|
|
Image(systemName: "checkmark")
|
|
.font(.system(size: 36, weight: .bold))
|
|
.foregroundStyle(.white)
|
|
}
|
|
.shadow(color: Color.accentColor.opacity(0.35), radius: 16, y: 8)
|
|
|
|
VStack(spacing: 6) {
|
|
Text("Welcome, \(name)")
|
|
.font(.title2.bold())
|
|
Text("Signing you in…")
|
|
.font(.subheadline)
|
|
.foregroundStyle(.secondary)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|