Legt das Fundament für den Plex-Client an: - XcodeGen-Projekt nach dem Muster von Onyx (com.scarriffleservices, strict concurrency, Projektdatei nicht eingecheckt) - FlixyKit mit vier Modulen: PlexKit, FlixyDesign, FlixyPlayback, FlixyDownloads. macOS steht als Plattform mit drin, damit die Logik-Tests ohne Simulator laufen. - FlixyDesign: dunkle Farb-Tokens, Schriftskala, Poster- und Querformat-Kacheln, Aufmacher-Bild. Die Akzentfarbe fließt über die Umgebung und wird per WCAG-Rechnung lesbar gehalten. - PlexKit: Kopfzeilen-Identität, Transport-Protokoll, Fehlerarten und die Medienmodelle samt nachsichtigem Decoder. - FlixyPlayback: VideoPlayerEngine-Protokoll und PlaybackDecider — die eine Funktion, an der Phase 2 das Transcoding andockt. - Ausfahrbare Seitenleiste auf dem iPhone, Split-View auf dem iPad. - 45 Tests, alle grün. VLCKit 4.0.0-a24 ist vorab geprüft: baut über SPM unter Swift 6 mit strict concurrency. Die iOS-Slice ist mit 239 MB allerdings gewichtig, deshalb bekommt sie in Phase 1 ein eigenes Target. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
42 lines
1.5 KiB
Swift
42 lines
1.5 KiB
Swift
import SwiftUI
|
|
|
|
/// Die Platzhalterfläche, solange ein Bild noch lädt.
|
|
///
|
|
/// Ein wandernder Lichtschein statt eines Spinners: er zeigt die endgültige
|
|
/// Form des Inhalts schon an, wodurch die Startseite beim Aufbauen nicht
|
|
/// springt.
|
|
public struct ShimmerPlaceholder: View {
|
|
@State private var phase: CGFloat = -1
|
|
/// Bewegte Flächen sind für manche Menschen unangenehm; bei aktivierter
|
|
/// Systemeinstellung bleibt der Platzhalter deshalb einfach ruhig stehen.
|
|
@Environment(\.accessibilityReduceMotion) private var reduceMotion
|
|
|
|
public init() {}
|
|
|
|
public var body: some View {
|
|
Rectangle()
|
|
.fill(Color.flixyPlaceholder)
|
|
.overlay {
|
|
if !reduceMotion {
|
|
GeometryReader { proxy in
|
|
LinearGradient(
|
|
colors: [.clear, Color.white.opacity(0.06), .clear],
|
|
startPoint: .leading,
|
|
endPoint: .trailing
|
|
)
|
|
.frame(width: proxy.size.width * 0.6)
|
|
.offset(x: phase * proxy.size.width * 1.6)
|
|
}
|
|
}
|
|
}
|
|
.clipped()
|
|
.onAppear {
|
|
guard !reduceMotion else { return }
|
|
withAnimation(.linear(duration: 1.4).repeatForever(autoreverses: false)) {
|
|
phase = 1
|
|
}
|
|
}
|
|
.accessibilityHidden(true)
|
|
}
|
|
}
|