Add album detail and track listing

This commit is contained in:
lucast committed 2026-10-07 01:40:54 +02:00
1 parent c415380336
commit 39a64bebf2
4 files changed
+355 -11

No files matched your search

+13 -6
View File
@@ -75,10 +75,15 @@ private struct HomeAlbumCarousel: View {
ScrollView(.horizontal) {
LazyHStack(alignment: .top, spacing: 14) {
ForEach(section.albums) { album in
HomeAlbumCard(album: album, artworkURL: artworkURL(album))
.containerRelativeFrame(.horizontal) { length, _ in
(length - 40 - 28) / 2.2
}
NavigationLink {
AlbumDetailView(albumID: album.id)
} label: {
HomeAlbumCard(album: album, artworkURL: artworkURL(album))
.containerRelativeFrame(.horizontal) { length, _ in
(length - 40 - 28) / 2.2
}
}
.buttonStyle(.plain)
}
}
.scrollTargetLayout()
@@ -92,8 +97,10 @@ private struct HomeAlbumCarousel: View {
private struct HomeAlbumCarousel_Previews: PreviewProvider {
static var previews: some View {
HomeAlbumCarousel(section: HomeViewModel.preview.sections[0]) { _ in nil }
.padding(.vertical, 24)
NavigationStack {
HomeAlbumCarousel(section: HomeViewModel.preview.sections[0]) { _ in nil }
.padding(.vertical, 24)
}
}
}