jel/Jel/Views/Library/Item/ItemInfoView.swift

45 lines
914 B
Swift

//
// ItemInfoView.swift
// Jel
//
// Created by zerocool on 12/24/23.
//
import SwiftUI
import JellyfinKit
struct ItemInfoView: View {
var item: BaseItemDto
var body: some View {
VStack(alignment: .leading) {
HStack {
Text((item.productionYear != nil) ? String(item.productionYear!) : "---")
Text("")
Text(item.genres?.first ?? "---")
}
HStack {
if item.type == .movie {
Text(item.getRuntime() ?? "-:--")
}
if let officialRating = item.officialRating {
Text(officialRating)
.bold()
.padding(2)
.overlay {
RoundedRectangle(cornerSize: CGSize(width: 2, height: 2), style: .continuous)
.stroke(.gray)
}
.foregroundStyle(.gray)
}
}
}
.font(.caption)
}
}
//#Preview {
// ItemInfoView()
//}