- Add LoadingSpinner component with small/medium/large sizes using system gray color - Add LoadingPlaceholder for skeleton loading states - Add LoadingSheet for full-screen blocking overlays - Replace ThemedSpinner/ThemedSpinnerCompact across all views - Remove deprecated loading components from AnimatedComponents.swift - Delete LoadingTextGenerator.swift - Fix PhotoImportView layout to fill full width Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
47 lines
1.2 KiB
Swift
47 lines
1.2 KiB
Swift
//
|
|
// LoadingTripsView.swift
|
|
// SportsTime
|
|
//
|
|
// Loading state for suggested trips carousel using skeleton placeholders.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct LoadingTripsView: View {
|
|
let message: String
|
|
@Environment(\.colorScheme) private var colorScheme
|
|
|
|
var body: some View {
|
|
VStack(alignment: .leading, spacing: Theme.Spacing.sm) {
|
|
// Header
|
|
HStack {
|
|
Text("Featured Trips")
|
|
.font(.title2)
|
|
.foregroundStyle(Theme.textPrimary(colorScheme))
|
|
Spacer()
|
|
}
|
|
|
|
// Loading indicator with message
|
|
LoadingSpinner(size: .small, label: message)
|
|
.padding(.vertical, Theme.Spacing.xs)
|
|
|
|
// Placeholder cards
|
|
ScrollView(.horizontal, showsIndicators: false) {
|
|
HStack(spacing: Theme.Spacing.md) {
|
|
ForEach(0..<3, id: \.self) { _ in
|
|
LoadingPlaceholder.card
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
VStack {
|
|
LoadingTripsView(message: "Loading trips...")
|
|
.padding()
|
|
}
|
|
.themedBackground()
|
|
}
|