2024-01-09 17:32:06 +00:00
|
|
|
//
|
|
|
|
// ItemPeopleView.swift
|
|
|
|
// Jel
|
|
|
|
//
|
|
|
|
// Created by zerocool on 1/8/24.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
import JellyfinKit
|
|
|
|
|
|
|
|
struct ItemPeopleView: View {
|
|
|
|
|
|
|
|
var item: BaseItemDto
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
VStack(alignment: .leading) {
|
|
|
|
Text("Cast and Crew")
|
|
|
|
.font(.title2)
|
|
|
|
.padding(.leading)
|
|
|
|
|
|
|
|
ScrollView(.horizontal) {
|
2024-01-12 01:44:49 +00:00
|
|
|
// FIXME: For some reason, a LazyHStack clips the text for this view
|
|
|
|
HStack(alignment: .top) {
|
2024-01-09 17:32:06 +00:00
|
|
|
ForEach(item.people ?? [], id: \.iterId) {person in
|
2024-01-12 01:44:49 +00:00
|
|
|
NavigationLink {
|
2024-01-13 07:20:20 +00:00
|
|
|
ItemPersonDetailView(person: person)
|
2024-01-12 01:44:49 +00:00
|
|
|
.navigationTitle(person.name ?? "Unnamed")
|
|
|
|
} label: {
|
|
|
|
ItemPersonIconView(person: person)
|
|
|
|
}
|
2024-01-09 17:32:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.padding(.horizontal)
|
|
|
|
}
|
|
|
|
.scrollIndicators(.hidden)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//#Preview {
|
|
|
|
// ItemPeopleView()
|
|
|
|
//}
|