36 lines
796 B
Swift
36 lines
796 B
Swift
//
|
|
// ItemMediaView.swift
|
|
// Jel
|
|
//
|
|
// Created by zerocool on 12/23/23.
|
|
//
|
|
|
|
import SwiftUI
|
|
import JellyfinKit
|
|
import VisibilityTrackingScrollView
|
|
|
|
struct ItemMediaView: View {
|
|
@EnvironmentObject var jellyfinClient: JellyfinClientController
|
|
@StateObject var authState: AuthStateController = AuthStateController.shared
|
|
|
|
var item: BaseItemDto
|
|
|
|
|
|
var body: some View {
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//#Preview {
|
|
// ItemMovieView(item: BaseItemDto())
|
|
//}
|