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

36 lines
796 B
Swift
Raw Normal View History

//
// ItemMediaView.swift
// Jel
//
// Created by zerocool on 12/23/23.
//
import SwiftUI
import JellyfinKit
import VisibilityTrackingScrollView
2024-01-08 19:00:59 +00:00
struct ItemMediaView: View {
@EnvironmentObject var jellyfinClient: JellyfinClientController
@StateObject var authState: AuthStateController = AuthStateController.shared
2024-01-08 19:00:59 +00:00
var item: BaseItemDto
2023-12-24 04:47:21 +00:00
var body: some View {
2024-01-08 19:00:59 +00:00
VStack(alignment: .leading) {
Text(item.taglines?.count ?? 0 > 0 ? item.taglines?[0] ?? "" : "")
.font(.headline)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.bottom)
ForEach(item.overview?.components(separatedBy: "<br>") ?? [], id: \.self) {overview in
Text(overview)
}
}
}
}
2023-12-25 01:01:52 +00:00
//#Preview {
// ItemMovieView(item: BaseItemDto())
//}