[F] Fix warnings
This commit is contained in:
@@ -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?.()}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user