feat: add LabelView to browse albums by record label
- Add get_label API endpoint and Tauri command - Create LabelView component with album grid, search, and infinite scroll - Add clickable label links in AlbumDetailView, AlbumCreditsModal, and TrackInfoModal - Add label_id to AlbumInfo and AlbumDetail types - Add label to QobuzTrack album summary for track info display
This commit is contained in:
1 parent
04197b98f0
commit
6467ca038e
13 files changed
+775
-8
No files matched your search
@@ -44,6 +44,7 @@
|
||||
year: string;
|
||||
releaseDate?: string;
|
||||
label: string;
|
||||
labelId?: number;
|
||||
genre: string;
|
||||
quality: string;
|
||||
trackCount: number;
|
||||
@@ -52,6 +53,7 @@
|
||||
};
|
||||
onBack: () => void;
|
||||
onArtistClick?: () => void;
|
||||
onLabelClick?: (labelId: number, labelName: string) => void;
|
||||
onTrackPlay?: (track: Track) => void;
|
||||
onTrackPlayNext?: (track: Track) => void;
|
||||
onTrackPlayLater?: (track: Track) => void;
|
||||
@@ -97,6 +99,7 @@
|
||||
album,
|
||||
onBack,
|
||||
onArtistClick,
|
||||
onLabelClick,
|
||||
onTrackPlay,
|
||||
onTrackPlayNext,
|
||||
onTrackPlayLater,
|
||||
@@ -318,7 +321,17 @@
|
||||
{:else}
|
||||
<div class="artist-name">{album.artist}</div>
|
||||
{/if}
|
||||
<div class="album-info">{formattedReleaseDate} • {album.label} • {album.genre}</div>
|
||||
<div class="album-info">
|
||||
{formattedReleaseDate} •
|
||||
{#if album.labelId && onLabelClick}
|
||||
<button class="label-link" onclick={() => onLabelClick!(album.labelId!, album.label)}>
|
||||
{album.label}
|
||||
</button>
|
||||
{:else}
|
||||
{album.label}
|
||||
{/if}
|
||||
• {album.genre}
|
||||
</div>
|
||||
<div class="album-quality">{album.quality}</div>
|
||||
<div class="album-stats">{album.trackCount} tracks • {album.duration}</div>
|
||||
|
||||
@@ -608,6 +621,21 @@
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.label-link {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
transition: color 150ms ease;
|
||||
}
|
||||
|
||||
.label-link:hover {
|
||||
color: var(--accent-primary);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.album-info {
|
||||
font-size: 14px;
|
||||
color: var(--text-muted);
|
||||
|
||||
Reference in new issue
Block a user