Files

50 lines
1.7 KiB
Swift
Executable File

import SwiftUI
struct SplashView: View {
@State private var animate = false
var body: some View {
ZStack {
LinearGradient(
colors: [Color.accentColor.opacity(0.95), Color.accentColor.opacity(0.62), Color(nsColor: .windowBackgroundColor)],
startPoint: .topLeading,
endPoint: .bottomTrailing
)
.ignoresSafeArea()
VStack(spacing: 22) {
ZStack {
RoundedRectangle(cornerRadius: 30, style: .continuous)
.fill(.ultraThinMaterial)
.frame(width: 126, height: 126)
.shadow(color: .black.opacity(0.18), radius: 28, y: 14)
Image(systemName: "arrow.triangle.2.circlepath")
.font(.system(size: 58, weight: .semibold))
.symbolRenderingMode(.hierarchical)
.foregroundStyle(.white)
.rotationEffect(.degrees(animate ? 360 : 0))
}
VStack(spacing: 6) {
Text("Rsync Studio")
.font(.system(size: 32, weight: .bold, design: .rounded))
Text("Fast, dependable file synchronisation for macOS")
.font(.headline)
.foregroundStyle(.secondary)
}
ProgressView()
.controlSize(.small)
.padding(.top, 2)
}
.padding(48)
}
.onAppear {
withAnimation(.linear(duration: 1.25).repeatForever(autoreverses: false)) {
animate = true
}
}
}
}