web-player: P4 — botones (Button, IconButton, PlayButton)
Button: variantes subtle (primary/secondary, se mantienen iguales por decisión del usuario), glass (antes secondaryOnGlow, con font-normal propio), accent, strong (cta-strong/ink, sustituye los overrides `!` del hero de Inicio), danger. Usa los tokens --color-btn* de P1 en vez de bg-[var(--mf-btn-...)]. Radio unificado a rounded-control. IconButton: añade shape (square/round), size (xs/sm/md/lg), tone (muted/subtle/plain), pressed (aria-pressed + text-accent), href/reload (enlaces), surface (fondo permanente + hover a surface-hover en vez del alias `hover` genérico, que coincide con surface-2 y no daba contraste). PlayButton nuevo: un solo sitio para los SVG de play/pausa, variantes strong/glass, as="span" para overlays no interactivos. Sustituye el botón principal de TransportControls, el overlay de MixTile y el círculo de "Mejor resultado" en Explorar. Migra a IconButton: cerrar cola, "Crear playlist" (Sidebar), Me gusta (TrackInfo, con pressed), cola (PlayerExtras), atrás (TopBar), login (MobileHeader) y las acciones de fila en tablas (quitar/añadir, size xs). BackLink usa size-icon-sm y quita un hover duplicado. Decisión (sin bloquear): se elimina el botón "adelante" decorativo de TopBar y el icono AlignJustify decorativo de PlayerExtras (código muerto visual). Los botones de TransportControls (shuffle/prev/next/ repeat) se dejan sin migrar a propósito: hoy no tienen fondo ni hit-box propios y IconButton siempre aplica una caja de tamaño fijo — migrarlos habría añadido una píldora de hover visible no verificable sin Docker en esta sesión. Verificado con npm run check/build.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
import { createPlaylistModal } from '$lib/playlists.svelte';
|
||||
import type { SessionUser } from '$lib/types';
|
||||
import Artwork from './ui/Artwork.svelte';
|
||||
import IconButton from './ui/IconButton.svelte';
|
||||
import Home from '@lucide/svelte/icons/house';
|
||||
import Compass from '@lucide/svelte/icons/compass';
|
||||
import ListMusic from '@lucide/svelte/icons/list-music';
|
||||
@@ -77,14 +78,14 @@
|
||||
<div class="flex items-center justify-between px-3 pb-1.5">
|
||||
<span class="text-xs font-medium tracking-widest text-muted uppercase">Tus playlists</span>
|
||||
{#if playlists.length > 0}
|
||||
<button
|
||||
type="button"
|
||||
<IconButton
|
||||
label="Crear playlist"
|
||||
tone="plain"
|
||||
size="xs"
|
||||
onclick={() => createPlaylistModal.show()}
|
||||
aria-label="Crear playlist"
|
||||
class="text-muted transition-colors hover:text-fg"
|
||||
>
|
||||
<Plus class="h-3.5 w-3.5" strokeWidth={1.25} />
|
||||
</button>
|
||||
<Plus class="size-icon-sm" strokeWidth={1.25} />
|
||||
</IconButton>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user