Skip to content

Commit

Permalink
feat: Show screenshots in the Software Index (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbmorley authored Sep 16, 2024
1 parent ee69ee1 commit 96697e3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions OpoLua/Software Index/ProgramView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ struct ProgramView: View {

var body: some View {
List {
if !(program.screenshots ?? []).isEmpty {
Section {
ScrollView(.horizontal) {
HStack {
ForEach(program.screenshots ?? [], id: \.self) { screenshot in
AsyncImage(url: URL.softwareIndexAPIV1.appendingPathComponent(screenshot))
}
}
}
}
}
ForEach(program.versions) { version in
Section(version.id) {
ForEach(version.variants) { variant in
Expand Down Expand Up @@ -65,6 +76,7 @@ struct ProgramView: View {
}
}
}
.listStyle(.plain)
.navigationTitle(program.name)
.navigationBarTitleDisplayMode(.inline)
}
Expand Down

0 comments on commit 96697e3

Please sign in to comment.