summaryrefslogtreecommitdiff
path: root/Jel/Views/Library/Item/ItemInfoView.swift
blob: 022fa7101ea8af0042169325a6d692f215416111 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
//  ItemInfoView.swift
//  Jel
//
//  Created by zerocool on 12/24/23.
//

import SwiftUI
import JellyfinKit

struct ItemInfoView: View {
  @State var item: BaseItemDto
  
  var body: some View {
    VStack(alignment: .leading) {
      HStack {
        Text((item.productionYear != nil) ? String(item.productionYear!) : "---")
          .shadow(color: .black, radius: 1)
        Text("•")
          .shadow(color: .black, radius: 1)
        Text(item.genres?.first ?? "---")
          .shadow(color: .black, radius: 1)
      }
      if item.type == .movie {
        Text(item.getRuntime() ?? "-:--")
          .shadow(color: .black, radius: 1)
      }
    }
    .font(.caption)
  }
}

//#Preview {
//  ItemInfoView()
//}