[F] Fix warnings

This commit is contained in:
2025-11-25 03:00:11 +08:00
parent 6c44a3650c
commit 07da64f31a
3 changed files with 5 additions and 7 deletions
+1 -3
View File
@@ -68,9 +68,7 @@
<div bind:this={lrcWrapper} class="lrc-wrapper scroll-here" lang="ja-JP">
<div class="vbox gap-12px py-32px relative min-h-full lrc-content">
{#if showCaret}
<div bind:this={caret} class="absolute bg-amber w-2px h-24px transition-all duration-75 z-5"></div>
{/if}
<div bind:this={caret} class="absolute bg-amber w-2px h-24px transition-all duration-75 z-5" hidden={!showCaret}></div>
{#each lines as line, l}
<div class="lrc p-content text-center m3-font-body-large" class:active={l === currentLineIndex} role="button" tabindex="0"
onclick={() => onLineClick?.()}
+3 -4
View File
@@ -96,17 +96,16 @@
})
// Playlist Navigation Logic
let nextSongId = $state<number | null>(null)
let isPlaylistFinished = $state(false)
const loc = data.user.data.loc
const playlist = data.playlist
let nextSongId = $state<number | null>(getNextSong(playlist, loc))
let isPlaylistFinished = $state(false)
// Check if this is the latest result for the current playlist session
const isCurrentResult = loc?.lastResultId === data.resultId
// Compute next state immediately
if (playlist && loc && isCurrentResult) {
nextSongId = getNextSong(playlist, loc)
if (nextSongId === null) isPlaylistFinished = true
}
+1
View File
@@ -37,6 +37,7 @@
let deduplicatedLyrics = $derived(dedupLines(data.lrc, isHideRepeated))
let processedLrc: ProcLrcLine[] = $derived(deduplicatedLyrics.map(line => processLrcLine(line.lyric)))
// State tracking for each kana character: UNSEEN, RIGHT, WRONG
// svelte-ignore state_referenced_locally
let states = $state(processedLrc.map(line => new Array(line.totalLen).fill('unseen')))
let musicControl: MusicControl | undefined