refactor(web-player): let TrackTable declare its own columns

Every one of the seven tables repeated the same header markup and hand
written grid templates, always in the same shape: an optional index, the
title, optional desktop-only meta columns, the duration and an optional
action. TrackTable now takes that shape as props and builds both grid
templates and the headers itself.
This commit is contained in:
2026-07-21 18:50:17 +02:00
parent 04eab6c6d6
commit 5585f4fa83
8 changed files with 51 additions and 67 deletions
@@ -27,12 +27,7 @@
<div class="mt-10 sm:mt-12">
<SectionHeading title="Tus canciones subidas" />
<TrackTable columns="1fr 64px 36px" columnsMobile="1fr 52px 32px">
{#snippet headers()}
<span>Título</span>
<span class="hidden text-center sm:block">Duración</span>
<span></span>
{/snippet}
<TrackTable action>
{#each library as track, i (track.id)}
<TrackRow>
<TrackTitleCell