web-player: P7 — filas (ListRow, MediaIdentity, EqBars)
Crea MediaIdentity.svelte (renombra y generaliza TrackTitleCell, puramente presentacional: arte + título + subtítulo, sin manejo de click) y ListRow.svelte encima (href|onclick, active, size xs/sm/lg, variant row|card, leading/trailing/overlay). Usa MediaIdentity también en player/TrackInfo... (pendiente: TrackInfo se deja para P12, que ya tiene tarea explícita de tocar ese archivo). Migra a ListRow: SearchResultRow (Explorar, 4 grupos — se borra el componente), Inicio (Continuar escuchando, Populares, spotlight, Tus playlists), Queue (A continuación), Sidebar (playlists). Las 6 tablas de pista (AlbumTrackTable, PlaylistTrackTable, library, liked, mixes, LibraryPicker) migran a MediaIdentity con su propio use:pressable local, ya que TrackList (P8) todavía no existe. EqBars gana prop `overlay` (fondo scrim/45, color on-art) que sustituye a NowPlaying.svelte (borrado). Corrige de paso 6 llamadas a plural() que P5 había dejado sin migrar (liked, library, mixes, playlists, PlaylistHeader, Inicio). Deltas documentados en el registro del plan: fila activa de Sidebar ahora usa el tinte de acento (antes gris neutro); tarjeta "Tus playlists" de Inicio pierde la línea de autor redundante y su radio pasa a rounded-art; filas de Queue pierden el opacity-80 del arte. Verificado con npm run check/build; sin QA visual autenticada (Docker no disponible en esta sesión).
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import X from '@lucide/svelte/icons/x';
|
||||
import Music from '@lucide/svelte/icons/music';
|
||||
import { player, toQueueItems } from '$lib/player/player.svelte';
|
||||
import { fmtTime, fmtDate } from '$lib/format';
|
||||
import { fmtTime, fmtDate, plural } from '$lib/format';
|
||||
import Page from '$lib/components/ui/Page.svelte';
|
||||
import PageHeader from '$lib/components/ui/PageHeader.svelte';
|
||||
import EmptyState from '$lib/components/ui/EmptyState.svelte';
|
||||
@@ -14,7 +14,8 @@
|
||||
import TrackRow from '$lib/components/ui/TrackRow.svelte';
|
||||
import TrackMeta from '$lib/components/ui/TrackMeta.svelte';
|
||||
import TrackIndexCell from '$lib/components/ui/TrackIndexCell.svelte';
|
||||
import TrackTitleCell from '$lib/components/ui/TrackTitleCell.svelte';
|
||||
import MediaIdentity from '$lib/components/ui/MediaIdentity.svelte';
|
||||
import { pressable } from '$lib/actions/pressable';
|
||||
|
||||
let { data } = $props();
|
||||
|
||||
@@ -34,7 +35,7 @@
|
||||
<Page>
|
||||
<PageHeader
|
||||
title="Tus canciones subidas"
|
||||
subtitle="{total} {total === 1 ? 'canción' : 'canciones'} subida{total === 1 ? '' : 's'}."
|
||||
subtitle="{plural(total, 'canción', 'canciones')} subida{total === 1 ? '' : 's'}."
|
||||
>
|
||||
{#snippet actions()}
|
||||
{#if items.length > 0}
|
||||
@@ -66,12 +67,16 @@
|
||||
playing={player.playing}
|
||||
onToggle={() => togglePlay(i)}
|
||||
/>
|
||||
<TrackTitleCell
|
||||
trackId={track.id}
|
||||
title={track.title}
|
||||
{active}
|
||||
onClick={() => togglePlay(i)}
|
||||
/>
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||
<div
|
||||
role="button"
|
||||
tabindex="0"
|
||||
use:pressable={() => togglePlay(i)}
|
||||
onclick={(event) => event.stopPropagation()}
|
||||
class="flex min-w-0 flex-1 text-left"
|
||||
>
|
||||
<MediaIdentity trackId={track.id} title={track.title} {active} />
|
||||
</div>
|
||||
<TrackMeta class="hidden sm:block">—</TrackMeta>
|
||||
<TrackMeta class="hidden sm:block">{fmtDate(track.createdAt)}</TrackMeta>
|
||||
<TrackMeta class="hidden sm:block">{Number(track.listensCount)}</TrackMeta>
|
||||
|
||||
Reference in New Issue
Block a user