release / go (push) Successful in 1m46s
release / web (push) Failing after 1m8s
release / govulncheck (push) Successful in 23s
release / integration (push) Successful in 4m12s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 1m38s
release / android (push) Canceled after 3m3s
Each home shelf now has its own shape. Main mixes and playlists are wide cards: the lead album's cover on a wash of its own colour, with the name and what the mix is built from beside it rather than over the art. Songs like mixes are circles, the shape artists already have. Genre mixes are short bands with a fan of three covers. Shelf sizes step down from the main mixes. Tiles show album covers in place of the four-cover collage, and no cover repeats along a shelf while a tile still has an unused one. The size and refresh time every mix on a shelf shares is said once, beside the shelf's title. Library pages keep the square card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
69 lines
2.5 KiB
Svelte
69 lines
2.5 KiB
Svelte
<script lang="ts">
|
||
import { Sparkles } from 'lucide-svelte';
|
||
|
||
let {
|
||
label,
|
||
variant = 'pending',
|
||
shape = 'square'
|
||
}: {
|
||
/** Card title (e.g. "For You" or "Songs like…"). */
|
||
label: string;
|
||
/** Drives copy + animation. */
|
||
variant?: 'building' | 'failed' | 'pending' | 'seed-needed';
|
||
/** Matches the shelf it stands in for, so a mix arriving does not
|
||
change the shelf's shape (see PlaylistCard's shapes). */
|
||
shape?: 'square' | 'wide' | 'round';
|
||
} = $props();
|
||
|
||
const copy = $derived.by(() => {
|
||
switch (variant) {
|
||
case 'building': return 'Building your daily mix…';
|
||
case 'failed': return 'Couldn’t build this mix. Retrying soon.';
|
||
case 'seed-needed': return 'Listen to more variety to unlock this slot.';
|
||
default: return 'Listen to a few tracks — appears within 24h.';
|
||
}
|
||
});
|
||
|
||
// animate-pulse on the cover area when variant is 'building' or 'pending'.
|
||
// 'pending' shows the animation since it's awaiting results within 24h.
|
||
// 'failed' and 'seed-needed' are static terminal states.
|
||
const coverClasses = $derived(
|
||
'aspect-square w-full overflow-hidden rounded-md bg-surface-hover ' +
|
||
'flex items-center justify-center text-text-muted ' +
|
||
(variant === 'building' || variant === 'pending' ? 'animate-pulse' : '')
|
||
);
|
||
</script>
|
||
|
||
{#if shape === 'wide'}
|
||
<div
|
||
class="flex h-full w-full overflow-hidden rounded-xl bg-surface text-left"
|
||
data-testid="playlist-placeholder-card"
|
||
data-variant={variant}
|
||
>
|
||
<div
|
||
class="flex aspect-square h-full shrink-0 items-center justify-center bg-surface-hover text-text-muted
|
||
{variant === 'building' || variant === 'pending' ? 'animate-pulse' : ''}"
|
||
>
|
||
<Sparkles size={40} strokeWidth={1} />
|
||
</div>
|
||
<div class="flex min-w-0 flex-1 flex-col gap-1 p-4">
|
||
<div class="truncate font-display text-2xl font-medium text-text-primary">{label}</div>
|
||
<div class="text-sm text-text-muted">{copy}</div>
|
||
</div>
|
||
</div>
|
||
{:else}
|
||
<div
|
||
class="flex w-full flex-col gap-2 rounded-md p-2 {shape === 'round' ? 'items-center text-center' : 'items-start text-left'}"
|
||
data-testid="playlist-placeholder-card"
|
||
data-variant={variant}
|
||
>
|
||
<div class="{coverClasses} {shape === 'round' ? 'rounded-full' : ''}">
|
||
<Sparkles size={40} strokeWidth={1} />
|
||
</div>
|
||
<div class="w-full min-w-0">
|
||
<div class="truncate text-sm font-medium text-text-primary">{label}</div>
|
||
<div class="truncate text-xs text-text-muted">{copy}</div>
|
||
</div>
|
||
</div>
|
||
{/if}
|