diff options
author | Shav Kinderlehrer <[email protected]> | 2023-12-22 19:29:07 -0500 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2023-12-22 19:29:07 -0500 |
commit | 568b4d6126e1408e8e16417f22370a4ced44d105 (patch) | |
tree | 8bd726c7d0259b17746f0db9c55c54f80e56d5de /Jel/Views/Dashboard/Library | |
parent | 5b78933de774fcf9291ba40e74dd928925699b0c (diff) | |
download | jel-568b4d6126e1408e8e16417f22370a4ced44d105.tar.gz jel-568b4d6126e1408e8e16417f22370a4ced44d105.zip |
Implement library view
Diffstat (limited to 'Jel/Views/Dashboard/Library')
-rw-r--r-- | Jel/Views/Dashboard/Library/LibraryIconView.swift | 10 | ||||
-rw-r--r-- | Jel/Views/Dashboard/Library/LibraryView.swift | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Jel/Views/Dashboard/Library/LibraryIconView.swift b/Jel/Views/Dashboard/Library/LibraryIconView.swift index c4dbde0..0131ff7 100644 --- a/Jel/Views/Dashboard/Library/LibraryIconView.swift +++ b/Jel/Views/Dashboard/Library/LibraryIconView.swift @@ -22,6 +22,10 @@ struct LibraryIconView: View { AsyncImageView(imageId: library.id ?? "", blurhash: library.imageBlurHashes?.primary?[library.imageTags?["Primary"] ?? ""] ?? "", imageType: "Primary") + .aspectRatio(contentMode: .fill) + .frame(width: 255, height: 150) + .clipShape(RoundedRectangle(cornerRadius: 5)) + Text(library.name ?? "Unknown") .font(.subheadline) @@ -29,6 +33,6 @@ struct LibraryIconView: View { } } -#Preview { - LibraryIconView(library: BaseItemDto()) -} +//#Preview { +// LibraryIconView(library: BaseItemDto()) +//} diff --git a/Jel/Views/Dashboard/Library/LibraryView.swift b/Jel/Views/Dashboard/Library/LibraryView.swift index 39ca6ba..63bfd64 100644 --- a/Jel/Views/Dashboard/Library/LibraryView.swift +++ b/Jel/Views/Dashboard/Library/LibraryView.swift @@ -16,7 +16,7 @@ struct LibraryView: View { @State var libraries: [BaseItemDto] = [] var body: some View { ScrollView(.horizontal, showsIndicators: false) { - LazyHStack { + HStack { ForEach(libraries) {library in if library.collectionType == "movies" || library.collectionType == "tvshows" { LibraryIconView(library: library) |