42 lines
771 B
Swift
42 lines
771 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 {
|
|
if let productionYear = item.productionYear {
|
|
Text(String(productionYear))
|
|
}
|
|
if let genres = item.genres {
|
|
Text("•")
|
|
Text(genres.first ?? "---")
|
|
}
|
|
}
|
|
|
|
HStack {
|
|
if item.type == .movie {
|
|
Text(item.getRuntime() ?? "-:--")
|
|
}
|
|
if let officialRating = item.officialRating {
|
|
TextRatingView(officialRating, fillStyle: .stroke)
|
|
}
|
|
}
|
|
}
|
|
.font(.caption)
|
|
}
|
|
}
|
|
|
|
//#Preview {
|
|
// ItemInfoView()
|
|
//}
|