feat: integrate lyrics module with UI

- Add lyricsStore for frontend state management with LRC parsing
- Wire LyricsSidebar to main layout with toggle button in NowPlayingBar
- Fix Rust compile errors (add Clone to LrclibItem, remove unused import)
- Add lyrics active line tracking with binary search
- Auto-start/stop lyrics updates based on playback state
This commit is contained in:
vicrodh committed 2026-01-10 06:31:12 -06:00
1 parent a3a766ba34
commit 80ff8afa3a
6 files changed
+533 -6

No files matched your search

+19 -2
View File
@@ -12,7 +12,8 @@
Volume2,
VolumeX,
Volume1,
Cast
Cast,
Mic2
} from 'lucide-svelte';
import QualityBadge from './QualityBadge.svelte';
@@ -42,6 +43,8 @@
onOpenQueue?: () => void;
onOpenFullScreen?: () => void;
onCast?: () => void;
onToggleLyrics?: () => void;
lyricsActive?: boolean;
}
let {
@@ -69,7 +72,9 @@
onToggleFavorite,
onOpenQueue,
onOpenFullScreen,
onCast
onCast,
onToggleLyrics,
lyricsActive = false
}: Props = $props();
let progressRef: HTMLDivElement;
@@ -242,6 +247,14 @@
<button class="action-btn" onclick={onCast} title="Cast to device">
<Cast size={20} />
</button>
<button
class="action-btn"
class:active={lyricsActive}
onclick={onToggleLyrics}
title="Lyrics"
>
<Mic2 size={20} />
</button>
<!-- Volume Control -->
<div class="volume-control">
@@ -500,6 +513,10 @@
color: var(--text-primary);
}
.action-btn.active {
color: var(--accent-primary);
}
/* Volume */
.volume-control {
display: flex;