blob: 46a5f5b334f1d9f09172181b4778425f447b862e (
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
36
37
38
39
40
41
42
43
44
45
|
//
// ItemSeriesEpisodeIconView.swift
// Jel
//
// Created by zerocool on 2/14/24.
//
import SwiftUI
import JellyfinKit
import ExpandableText
struct ItemSeriesEpisodeIconView: View {
var item: BaseItemDto
@EnvironmentObject var size: ScreenSize
var iconWidthMultiplier: CGFloat = 0.5
var body: some View {
VStack(alignment: .leading) {
HStack {
ItemIconView(item: item,
width: (size.size.width * iconWidthMultiplier),
height: (size.size.width * iconWidthMultiplier) / 1.7,
contentMode: .fill)
VStack(alignment: .leading) {
Text("Episode \(item.indexNumber ?? 0)")
.foregroundStyle(.secondary)
.font(.callout)
Text(item.name ?? "---")
.bold()
}
.frame(height: (size.size.width * iconWidthMultiplier) / 1.7)
}
ExpandableText((item.overviewNL ?? "").replacingOccurrences(of: "<br>", with: "\n"))
.foregroundColor(.secondary)
}
}
}
//#Preview {
// ItemSeriesEpisodeIconView()
//}
|