38 lines
704 B
Swift
38 lines
704 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 {
|
|
TextRatingView(officialRating, fillStyle: .stroke)
|
|
}
|
|
}
|
|
}
|
|
.font(.caption)
|
|
}
|
|
}
|
|
|
|
//#Preview {
|
|
// ItemInfoView()
|
|
//}
|