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

38 lines
704 B
Swift
Raw Normal View History

2023-12-25 01:01:52 +00:00
//
// ItemInfoView.swift
// Jel
//
// Created by zerocool on 12/24/23.
//
import SwiftUI
import JellyfinKit
struct ItemInfoView: View {
2024-01-08 00:20:56 +00:00
var item: BaseItemDto
2023-12-25 01:01:52 +00:00
var body: some View {
VStack(alignment: .leading) {
HStack {
Text((item.productionYear != nil) ? String(item.productionYear!) : "---")
Text("")
Text(item.genres?.first ?? "---")
2023-12-25 01:01:52 +00:00
}
2024-01-08 17:57:25 +00:00
HStack {
if item.type == .movie {
Text(item.getRuntime() ?? "-:--")
}
if let officialRating = item.officialRating {
2024-01-09 17:32:06 +00:00
TextRatingView(officialRating, fillStyle: .stroke)
2024-01-08 17:57:25 +00:00
}
}
2023-12-25 01:01:52 +00:00
}
.font(.caption)
}
}
//#Preview {
// ItemInfoView()
//}