2023-12-23 19:15:01 +00:00
|
|
|
//
|
2023-12-27 13:25:35 +00:00
|
|
|
// ItemMediaView.swift
|
2023-12-23 19:15:01 +00:00
|
|
|
// Jel
|
|
|
|
//
|
|
|
|
// Created by zerocool on 12/23/23.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
import JellyfinKit
|
2024-01-08 02:21:36 +00:00
|
|
|
import VisibilityTrackingScrollView
|
2023-12-23 19:15:01 +00:00
|
|
|
|
2024-01-08 19:00:59 +00:00
|
|
|
struct ItemMediaView: View {
|
2023-12-23 19:15:01 +00:00
|
|
|
@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
|
|
|
|
2023-12-24 07:36:14 +00:00
|
|
|
|
2023-12-23 19:15:01 +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-24 07:36:14 +00:00
|
|
|
}
|
2023-12-23 19:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-25 01:01:52 +00:00
|
|
|
//#Preview {
|
|
|
|
// ItemMovieView(item: BaseItemDto())
|
|
|
|
//}
|