05/15 Update: show issue's images, push notifications

This commit is contained in:
Nguyen Ngo
2026-05-15 15:41:13 -04:00
parent 9fd3f5b829
commit 7320e88dec
7 changed files with 398 additions and 14 deletions
@@ -875,6 +875,32 @@ struct IssueDetailView: View {
}
}
}
if !issue.photoServerPaths.isEmpty {
Section("Photos (\(issue.photoServerPaths.count))") {
ForEach(issue.photoServerPaths, id: \.self) { relativePath in
AsyncImage(url: URL(string: Constants.baseURL + "/" + relativePath)) { phase in
switch phase {
case .success(let image):
image
.resizable()
.scaledToFit()
.clipShape(RoundedRectangle(cornerRadius: 8))
case .failure:
Label("Photo unavailable", systemImage: "photo.slash")
.foregroundStyle(.secondary)
case .empty:
HStack(spacing: 8) {
ProgressView()
Text("Loading…").font(.caption).foregroundStyle(.secondary)
}
@unknown default:
EmptyView()
}
}
}
}
}
}
.navigationTitle("Issue Detail")
.navigationBarTitleDisplayMode(.inline)