feat(web): update nav (Home/Artists/Albums); retire ArtistRow
Add Artists and Albums nav entries, rename root label from Library to Home. Migrate all three ArtistRow call sites (search, search/artists, library/liked) to ArtistCard with grid wrapper; delete ArtistRow component and its test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
createLikedAlbumsInfiniteQuery,
|
||||
createLikedArtistsInfiniteQuery
|
||||
} from '$lib/api/likes';
|
||||
import ArtistRow from '$lib/components/ArtistRow.svelte';
|
||||
import ArtistCard from '$lib/components/ArtistCard.svelte';
|
||||
import AlbumCard from '$lib/components/AlbumCard.svelte';
|
||||
import TrackRow from '$lib/components/TrackRow.svelte';
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
{#if artistsTotal === 0}
|
||||
<p class="text-text-secondary">No liked artists yet.</p>
|
||||
{:else}
|
||||
<div>
|
||||
<div class="grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5">
|
||||
{#each artists as a (a.id)}
|
||||
<ArtistRow artist={a} />
|
||||
<ArtistCard artist={a} />
|
||||
{/each}
|
||||
</div>
|
||||
{#if artistsQuery?.hasNextPage}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/state';
|
||||
import { createSearchQuery } from '$lib/api/queries';
|
||||
import ArtistRow from '$lib/components/ArtistRow.svelte';
|
||||
import ArtistCard from '$lib/components/ArtistCard.svelte';
|
||||
import AlbumCard from '$lib/components/AlbumCard.svelte';
|
||||
import TrackRow from '$lib/components/TrackRow.svelte';
|
||||
import SearchSkeleton from '$lib/components/SearchSkeleton.svelte';
|
||||
@@ -59,9 +59,9 @@
|
||||
</a>
|
||||
{/if}
|
||||
</header>
|
||||
<div>
|
||||
<div class="grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5">
|
||||
{#each artists.items as a (a.id)}
|
||||
<ArtistRow artist={a} />
|
||||
<ArtistCard artist={a} />
|
||||
{/each}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/state';
|
||||
import { createSearchArtistsInfiniteQuery } from '$lib/api/queries';
|
||||
import ArtistRow from '$lib/components/ArtistRow.svelte';
|
||||
import ArtistCard from '$lib/components/ArtistCard.svelte';
|
||||
import LibrarySkeleton from '$lib/components/LibrarySkeleton.svelte';
|
||||
import ApiErrorBanner from '$lib/components/ApiErrorBanner.svelte';
|
||||
import { useDelayed } from '$lib/utils/useDelayed.svelte';
|
||||
@@ -35,9 +35,9 @@
|
||||
{:else if total === 0}
|
||||
<p class="text-text-secondary">No artist matches.</p>
|
||||
{:else}
|
||||
<div>
|
||||
<div class="grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5">
|
||||
{#each artists as a (a.id)}
|
||||
<ArtistRow artist={a} />
|
||||
<ArtistCard artist={a} />
|
||||
{/each}
|
||||
</div>
|
||||
{#if query?.hasNextPage}
|
||||
|
||||
Reference in New Issue
Block a user