Version one on the App Store

This commit is contained in:
2026-04-05 19:44:30 +02:00
parent c780be089d
commit 3ebf1763ed
26 changed files with 2088 additions and 842 deletions
@@ -41,16 +41,11 @@ struct PlaylistsView: View {
.listStyle(.plain)
}
}
.navigationDestination(for: MAPlaylist.self) { playlist in
PlaylistDetailView(playlist: playlist)
}
.refreshable {
await loadPlaylists(refresh: true)
}
.task {
if playlists.isEmpty {
await loadPlaylists(refresh: false)
}
await loadPlaylists(refresh: !playlists.isEmpty)
}
.alert("Error", isPresented: $showError) {
Button("OK", role: .cancel) { }
@@ -80,29 +75,21 @@ struct PlaylistRow: View {
var body: some View {
HStack(spacing: 12) {
// Playlist Cover
if let imageUrl = playlist.imageUrl {
let coverURL = service.imageProxyURL(path: imageUrl, size: 128)
CachedAsyncImage(url: coverURL) { image in
image
.resizable()
.aspectRatio(contentMode: .fill)
} placeholder: {
Rectangle()
.fill(Color.gray.opacity(0.2))
}
.frame(width: 64, height: 64)
.clipShape(RoundedRectangle(cornerRadius: 8))
} else {
CachedAsyncImage(url: service.imageProxyURL(path: playlist.imageUrl, provider: playlist.imageProvider, size: 128)) { image in
image
.resizable()
.aspectRatio(contentMode: .fill)
} placeholder: {
RoundedRectangle(cornerRadius: 8)
.fill(Color.gray.opacity(0.2))
.frame(width: 64, height: 64)
.overlay {
Image(systemName: "music.note.list")
.font(.title2)
.foregroundStyle(.secondary)
}
}
.frame(width: 64, height: 64)
.clipShape(RoundedRectangle(cornerRadius: 8))
// Playlist Info
VStack(alignment: .leading, spacing: 4) {