Build iOS App / Build .ipa and publish source (push) Failing after 35s
Multi-repo PR inbox, review (approve/request changes/comment), merge with gating toggle, read-only diff viewer, and Gitea Actions check status with one-tap re-run. Ships unsigned via the iMac runner to the SideStore source.
49 lines
1.2 KiB
Swift
49 lines
1.2 KiB
Swift
import SwiftUI
|
|
|
|
struct CICircle: View {
|
|
let status: CIStatus
|
|
var body: some View {
|
|
Circle()
|
|
.fill(color)
|
|
.frame(width: 10, height: 10)
|
|
}
|
|
private var color: Color {
|
|
switch status {
|
|
case .success: return .green
|
|
case .failure: return .red
|
|
case .running: return .orange
|
|
case .cancelled: return .gray
|
|
case .unknown: return .gray.opacity(0.5)
|
|
}
|
|
}
|
|
}
|
|
|
|
struct ReviewBadge: View {
|
|
let state: ReviewState
|
|
var body: some View {
|
|
Text(text)
|
|
.font(.caption2.weight(.semibold))
|
|
.padding(.horizontal, 6)
|
|
.padding(.vertical, 2)
|
|
.background(color.opacity(0.15))
|
|
.foregroundColor(color)
|
|
.clipShape(Capsule())
|
|
}
|
|
private var text: String {
|
|
switch state {
|
|
case .approved: return "Approved"
|
|
case .changesRequested: return "Changes"
|
|
case .needsReview: return "Needs review"
|
|
case .unknown: return ""
|
|
}
|
|
}
|
|
private var color: Color {
|
|
switch state {
|
|
case .approved: return .green
|
|
case .changesRequested: return .red
|
|
case .needsReview: return .orange
|
|
case .unknown: return .gray
|
|
}
|
|
}
|
|
}
|