summaryrefslogtreecommitdiff
path: root/Jel/Views/Dashboard/DashboardLibraryView.swift
diff options
context:
space:
mode:
authorShav Kinderlehrer <[email protected]>2023-12-23 11:14:53 -0500
committerShav Kinderlehrer <[email protected]>2023-12-23 11:14:53 -0500
commita25acb1219d506351717edef8ad728abcdaf50f9 (patch)
tree096894c4bd043aa043ecf49c6f35a0dbf97267df /Jel/Views/Dashboard/DashboardLibraryView.swift
parent885615d1dd029138700c36bb8b23d211cf713811 (diff)
downloadjel-a25acb1219d506351717edef8ad728abcdaf50f9.tar.gz
jel-a25acb1219d506351717edef8ad728abcdaf50f9.zip
Use asyncImage for libraryIcons
Diffstat (limited to 'Jel/Views/Dashboard/DashboardLibraryView.swift')
-rw-r--r--Jel/Views/Dashboard/DashboardLibraryView.swift12
1 files changed, 9 insertions, 3 deletions
diff --git a/Jel/Views/Dashboard/DashboardLibraryView.swift b/Jel/Views/Dashboard/DashboardLibraryView.swift
index 98c92c0..00f0e68 100644
--- a/Jel/Views/Dashboard/DashboardLibraryView.swift
+++ b/Jel/Views/Dashboard/DashboardLibraryView.swift
@@ -14,7 +14,12 @@ struct DashboardLibraryView: View {
@StateObject var authState: AuthStateController = AuthStateController.shared
@State var libraries: [BaseItemDto] = []
+ @State var loading: Bool = true
var body: some View {
+ if loading {
+ ProgressView()
+ .progressViewStyle(.circular)
+ }
ScrollView(.horizontal, showsIndicators: false) {
HStack {
ForEach(libraries) {library in
@@ -22,9 +27,10 @@ struct DashboardLibraryView: View {
NavigationLink {
LibraryDetailView(library: library)
} label: {
- LibraryIconView(library: library, height: 200)
+ LibraryIconView(library: library, height: 150)
.padding()
}
+ .buttonStyle(PlainButtonStyle())
}
}
}
@@ -36,11 +42,11 @@ struct DashboardLibraryView: View {
if let results = try await jellyfinClient.send(request).value.items {
libraries = results
}
+ loading = false
} catch {
}
}
- }
- }
+ }}
}
//#Preview {