feat(ui): add album title ticker and artist link guards
This commit is contained in:
1 parent
60e9a716f7
commit
4735e75ed4
3 files changed
+70
-4
No files matched your search
@@ -92,6 +92,9 @@
|
||||
let isFavorite = $state(false);
|
||||
let isFavoriteLoading = $state(false);
|
||||
let playBtnHovered = $state(false);
|
||||
const isVariousArtists = $derived(
|
||||
album.artist?.trim().toLowerCase() === 'various artists'
|
||||
);
|
||||
|
||||
interface FavoritesResponse {
|
||||
albums?: { items: Array<{ id: string }>; total: number };
|
||||
@@ -150,9 +153,13 @@
|
||||
<!-- Album Metadata -->
|
||||
<div class="metadata">
|
||||
<h1 class="album-title">{album.title}</h1>
|
||||
<button class="artist-link" onclick={onArtistClick}>
|
||||
{album.artist}
|
||||
</button>
|
||||
{#if onArtistClick && !isVariousArtists}
|
||||
<button class="artist-link" onclick={onArtistClick}>
|
||||
{album.artist}
|
||||
</button>
|
||||
{:else}
|
||||
<div class="artist-name">{album.artist}</div>
|
||||
{/if}
|
||||
<div class="album-info">{album.year} • {album.label} • {album.genre}</div>
|
||||
<div class="album-quality">{album.quality}</div>
|
||||
<div class="album-stats">{album.trackCount} tracks • {album.duration}</div>
|
||||
@@ -333,6 +340,13 @@
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.artist-name {
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.artist-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@@ -680,6 +680,7 @@
|
||||
|
||||
async function handleLocalArtistClick(name?: string) {
|
||||
if (!name || !onQobuzArtistClick) return;
|
||||
if (normalizeArtistName(name) === 'various artists') return;
|
||||
try {
|
||||
const artistId = await resolveQobuzArtistId(name);
|
||||
if (artistId) {
|
||||
|
||||
Reference in new issue
Block a user