feat(tracks): search
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { getCoverUrl } from '$lib/covers';
|
||||
import type { Track } from '$lib/proto/library';
|
||||
import AudioLines from 'virtual:icons/lucide/audio-lines';
|
||||
// import AudioLines from 'virtual:icons/lucide/audio-lines';
|
||||
|
||||
interface Props {
|
||||
track: Track;
|
||||
@@ -12,16 +12,13 @@
|
||||
let { track, currentlyPlaying = false, oncontextmenu }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="flex flex-col gap-3"
|
||||
data-track-hash={track.hash}
|
||||
oncontextmenu={(e) => oncontextmenu?.(e, track.hash)}
|
||||
>
|
||||
<div class="flex flex-col gap-3" data-track-hash={track.hash}>
|
||||
<div class="relative aspect-square w-full">
|
||||
<button
|
||||
type="submit"
|
||||
class="relative aspect-square h-full w-full overflow-hidden rounded-lg"
|
||||
formaction="/tracks/{track.hash}?/play"
|
||||
oncontextmenu={(e) => oncontextmenu?.(e, track.hash)}
|
||||
>
|
||||
<img
|
||||
class="aspect-square h-full w-full transform-gpu transition-all duration-150 hover:scale-105 hover:saturate-150"
|
||||
@@ -31,9 +28,9 @@
|
||||
height="640"
|
||||
/>
|
||||
</button>
|
||||
<div class="absolute bottom-6 left-2 size-4 animate-pulse" class:hidden={!currentlyPlaying}>
|
||||
<!-- <div class="absolute bottom-6 left-2 size-4 animate-pulse" class:hidden={!currentlyPlaying}>
|
||||
<AudioLines class="text-primary" />
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="relative space-y-1 text-sm">
|
||||
<h3 class="font-medium leading-none">{track.name}</h3>
|
||||
|
||||
Reference in New Issue
Block a user