drag and drop but nicer
This commit is contained in:
@@ -80,21 +80,28 @@
|
|||||||
class:border-primary={dragOverIndex === i}
|
class:border-primary={dragOverIndex === i}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="w-8 shrink-0 flex items-center justify-center cursor-grab active:cursor-grabbing text-muted-foreground/50 hover:text-foreground"
|
class="w-6 shrink-0 flex items-center justify-center text-xs text-muted-foreground/60 font-mono"
|
||||||
aria-label="Drag to reorder"
|
|
||||||
>
|
>
|
||||||
<GripVertical class="h-4 w-4" />
|
<!-- Default: Number or Active Indicator -->
|
||||||
</div>
|
<div
|
||||||
<div
|
class="group-hover:hidden flex items-center justify-center w-full h-full"
|
||||||
class="w-6 shrink-0 text-center text-xs text-muted-foreground/60 font-mono"
|
>
|
||||||
>
|
{#if player.currentId === track.id}
|
||||||
{#if player.currentId === track.id}
|
<div
|
||||||
<div
|
class="w-2 h-2 bg-primary rounded-full animate-pulse"
|
||||||
class="w-2 h-2 bg-primary rounded-full mx-auto animate-pulse"
|
></div>
|
||||||
></div>
|
{:else}
|
||||||
{:else}
|
<span>{i + 1}</span>
|
||||||
<span class="text-xs">{i + 1}</span>
|
{/if}
|
||||||
{/if}
|
</div>
|
||||||
|
|
||||||
|
<!-- Hover: Grip Handle -->
|
||||||
|
<div
|
||||||
|
class="hidden group-hover:flex items-center justify-center w-full h-full cursor-grab active:cursor-grabbing text-muted-foreground/50 hover:text-foreground"
|
||||||
|
aria-label="Drag to reorder"
|
||||||
|
>
|
||||||
|
<GripVertical class="h-4 w-4" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-1 min-w-0">
|
<div class="flex-1 min-w-0">
|
||||||
|
|||||||
Reference in New Issue
Block a user