summaryrefslogtreecommitdiff
path: root/Jel/Views/Dashboard/Library/LibraryIconView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Jel/Views/Dashboard/Library/LibraryIconView.swift')
-rw-r--r--Jel/Views/Dashboard/Library/LibraryIconView.swift22
1 files changed, 19 insertions, 3 deletions
diff --git a/Jel/Views/Dashboard/Library/LibraryIconView.swift b/Jel/Views/Dashboard/Library/LibraryIconView.swift
index 4f6c711..c4dbde0 100644
--- a/Jel/Views/Dashboard/Library/LibraryIconView.swift
+++ b/Jel/Views/Dashboard/Library/LibraryIconView.swift
@@ -6,13 +6,29 @@
//
import SwiftUI
+import JellyfinKit
+import BlurHashKit
struct LibraryIconView: View {
- var body: some View {
- Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
+ @EnvironmentObject var jellyfinClient: JellyfinClientController
+
+ @State var library: BaseItemDto
+ @State var loadingImage: Bool = true
+
+ @State var loadedImageBinaryData: Data?
+
+ var body: some View {
+ VStack {
+ AsyncImageView(imageId: library.id ?? "",
+ blurhash: library.imageBlurHashes?.primary?[library.imageTags?["Primary"] ?? ""] ?? "",
+ imageType: "Primary")
+
+ Text(library.name ?? "Unknown")
+ .font(.subheadline)
}
+ }
}
#Preview {
- LibraryIconView()
+ LibraryIconView(library: BaseItemDto())
}