feat(slint): lyrics controls flyout, per-user prefs, cache settings row

Sidebar header gains the controls flyout (auto-follow, font size on the
280px-adapted scale, dimming, active color, uppercase, copy lyrics,
reset). Every setting persists per user via the new lyrics_prefs store
(loaded on all session activation paths, applied into LyricsState,
Tauri defaults). Settings gains the lyrics cache row with honest per-user
stats and clear (the F1 fix shipped in qbz-lyrics). Parity and @tr sweep
over the sidebar surfaces per the review inventory.

Closes the S1-S5 implementation run of the Lyrics epic: Qobuz-first
word-synced lyrics (real per-word timestamps - richer than Tauri's
line-level estimation), LRCLIB/lyrics.ovh fallback, shared per-user cache
with additive wsync column, 30Hz sync engine with word-anchored karaoke
fill, auto-center scroll, and QConnect peer-following.

cc
This commit is contained in:
vicrodh committed 2026-06-10 18:00:29 -06:00
1 parent 5f9fd5bdd6
commit eea336fd49
9 files changed
+867 -43

No files matched your search

@@ -19,7 +19,7 @@ import { Theme } from "../foundation/semantic-colors.slint";
import { Palette } from "../foundation/palette.slint";
import { Typography } from "../foundation/typography.slint";
import { Radius } from "../foundation/radius.slint";
import { OfflineManagerActions, OfflineModeActions, OfflineState, SettingsState } from "../state.slint";
import { LyricsState, OfflineManagerActions, OfflineModeActions, OfflineState, SettingsState } from "../state.slint";
import { QbzToggle } from "../primitives/QbzToggle.slint";
import { SettingRow } from "SettingRow.slint";
@@ -74,9 +74,11 @@ export component OfflineSettings inherits VerticalLayout {
spacing: 4px;
// Re-seed the toggle states from the engine store on every mount of
// this section (same lazy-load hook LocalLibrarySettings uses).
// this section (same lazy-load hook LocalLibrarySettings uses); also
// refresh the lyrics-cache stats for the LYRICS group below.
init => {
OfflineModeActions.load();
LyricsState.cache-refresh();
}
GroupHeader { text: @tr("OFFLINE MODE"); }
@@ -162,4 +164,27 @@ export component OfflineSettings inherits VerticalLayout {
}
}
}
Rectangle { height: 12px; }
Divider { }
Rectangle { height: 12px; }
// Lyrics cache (Tauri Settings > Storage row, SettingsView.svelte:6539-
// 6562). Stats come from the REAL per-user lyrics.db via qbz_lyrics
// cache_stats — fix-forward F1 (Tauri measured a stale global path).
GroupHeader { text: @tr("LYRICS"); }
SettingRow {
label: @tr("Clear lyrics cache");
description: LyricsState.cache-loaded
? @tr("{} entries using {}", LyricsState.cache-entries-text, LyricsState.cache-size)
: "";
SecondaryButton {
label: @tr("Clear");
danger: true;
clicked => {
LyricsState.cache-clear();
}
}
}
}