Use atproto actions with ease in iOS shortcuts
at main 1.4 kB view raw
1// 2// Untitled.swift 3// shortcut 4// 5// Created by Bailey Townsend on 6/27/25. 6// 7 8import SwiftUI 9 10// MARK: - Loading Overlay Component 11struct LoadingOverlay: View { 12 let message: String? 13 14 init(message: String? = nil) { 15 self.message = message 16 } 17 18 var body: some View { 19 ZStack { 20 // Semi-transparent background 21 Color.black.opacity(0.4) 22 .ignoresSafeArea() 23 24 // Loading content 25 VStack(spacing: 16) { 26 ProgressView() 27 .scaleEffect(1.2) 28 .progressViewStyle(CircularProgressViewStyle(tint: .white)) 29 30 if let message = message { 31 Text(message) 32 .foregroundColor(.white) 33 .font(.system(size: 16, weight: .medium)) 34 .multilineTextAlignment(.center) 35 } 36 } 37 .padding(24) 38 .background( 39 RoundedRectangle(cornerRadius: 12) 40 .fill(Color.black.opacity(0.8)) 41 ) 42 } 43 } 44} 45 46// MARK: - View Extension for Easy Usage 47extension View { 48 func loadingOverlay(isShowing: Bool, message: String? = nil) -> some View { 49 ZStack { 50 self 51 52 if isShowing { 53 LoadingOverlay(message: message) 54 } 55 } 56 } 57}