Design Prot Merge #1

Merged
NotS1mp merged 217 commits from design-prot into master 2026-09-21 15:48:16 +00:00
3 changed files with 13 additions and 3 deletions
Showing only changes of commit b75c97a696 - Show all commits
@@ -8,6 +8,7 @@
id: string | number; id: string | number;
title: string; title: string;
artist?: string | null; artist?: string | null;
typeLabel?: string;
coverSrc?: string | null; coverSrc?: string | null;
coverSize?: 'small' | 'medium' | 'large'; coverSize?: 'small' | 'medium' | 'large';
hue: number; hue: number;
@@ -24,6 +25,7 @@
id, id,
title, title,
artist, artist,
typeLabel,
coverSrc, coverSrc,
coverSize = 'large', coverSize = 'large',
hue, hue,
@@ -35,6 +37,8 @@
onContextMenu, onContextMenu,
badge badge
}: Props = $props(); }: Props = $props();
const meta = $derived([typeLabel, artist].filter((part) => !!part).join(' · '));
</script> </script>
<li <li
@@ -64,11 +68,11 @@
{/if} {/if}
<span class="truncate text-fg" {title}>{title}</span> <span class="truncate text-fg" {title}>{title}</span>
</div> </div>
{#if badge || artist} {#if badge || meta}
<div class="mt-0.5 flex min-w-0 items-center gap-1.5"> <div class="mt-0.5 flex min-w-0 items-center gap-1.5">
{@render badge?.()} {@render badge?.()}
{#if artist} {#if meta}
<span class="truncate text-sm text-fg-3" title={artist}>{artist}</span> <span class="truncate text-sm text-fg-3" title={meta}>{meta}</span>
{/if} {/if}
</div> </div>
{/if} {/if}
@@ -8,6 +8,7 @@
title: string; title: string;
href?: string; href?: string;
subtitle?: string; subtitle?: string;
typeLabel?: string;
releaseYear?: number; releaseYear?: number;
trackCount?: number; trackCount?: number;
trackIds?: (string | number)[]; trackIds?: (string | number)[];
@@ -20,6 +21,7 @@
title, title,
href, href,
subtitle, subtitle,
typeLabel,
releaseYear, releaseYear,
trackCount, trackCount,
trackIds = [], trackIds = [],
@@ -29,6 +31,7 @@
const meta = $derived( const meta = $derived(
[ [
typeLabel,
subtitle, subtitle,
releaseYear ? String(releaseYear) : undefined, releaseYear ? String(releaseYear) : undefined,
trackCount === undefined trackCount === undefined
@@ -275,6 +275,7 @@
<AlbumCard <AlbumCard
id={album.id} id={album.id}
title={album.title} title={album.title}
typeLabel="Álbum"
releaseYear={album.releaseYear === null ? undefined : Number(album.releaseYear)} releaseYear={album.releaseYear === null ? undefined : Number(album.releaseYear)}
trackCount={Number(album.trackCount)} trackCount={Number(album.trackCount)}
trackIds={album.coverTrackIds} trackIds={album.coverTrackIds}
@@ -286,6 +287,7 @@
id={album.albumId} id={album.albumId}
href="/albums/youtube/{album.albumId}" href="/albums/youtube/{album.albumId}"
title={album.title} title={album.title}
typeLabel="Álbum"
subtitle={album.artist} subtitle={album.artist}
releaseYear={album.releaseYear === null ? undefined : Number(album.releaseYear)} releaseYear={album.releaseYear === null ? undefined : Number(album.releaseYear)}
coverSrc={album.thumbnailUrl} coverSrc={album.thumbnailUrl}
@@ -314,6 +316,7 @@
id={targetId(item)} id={targetId(item)}
title={targetTitle(item)} title={targetTitle(item)}
artist={targetArtist(item)} artist={targetArtist(item)}
typeLabel="Canción"
coverSrc={targetCoverSrc(item)} coverSrc={targetCoverSrc(item)}
hue={hueFor(targetId(item))} hue={hueFor(targetId(item))}
explicit={targetExplicit(item)} explicit={targetExplicit(item)}