2024-06-19 15:15:27 +00:00
|
|
|
import SwiftUI
|
|
|
|
|
2024-08-11 15:47:54 +00:00
|
|
|
struct LoadingScreen: View {
|
|
|
|
var body: some View {
|
|
|
|
GeometryReader { geo in
|
2024-06-19 15:15:27 +00:00
|
|
|
ZStack {
|
2024-08-11 15:47:54 +00:00
|
|
|
// background with opacity
|
2024-07-04 08:21:12 +00:00
|
|
|
Color.Material.Elements.active.opacity(0.3)
|
2024-06-19 15:15:27 +00:00
|
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
|
|
|
|
|
|
// loader
|
|
|
|
ProgressView()
|
|
|
|
.progressViewStyle(
|
2024-07-04 08:21:12 +00:00
|
|
|
CircularProgressViewStyle(tint: .Material.Elements.active)
|
2024-06-19 15:15:27 +00:00
|
|
|
)
|
2024-08-11 15:47:54 +00:00
|
|
|
.position(x: geo.size.width / 2, y: geo.size.height / 2)
|
2024-06-19 15:15:27 +00:00
|
|
|
.controlSize(.large)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.ignoresSafeArea()
|
|
|
|
.transition(AnyTransition.opacity.animation(.easeInOut(duration: 0.1)))
|
|
|
|
}
|
|
|
|
}
|