From 08334d8531d21a37b507d1c05dc2584eff2e2401 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Wed, 19 Nov 2025 13:08:02 +0800 Subject: [PATCH] [+] Stats --- src/lib/server/songs.ts | 2 ++ src/routes/song/[slug]/+page.svelte | 27 +++++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/lib/server/songs.ts b/src/lib/server/songs.ts index 7c8bc7f..057b80a 100644 --- a/src/lib/server/songs.ts +++ b/src/lib/server/songs.ts @@ -89,3 +89,5 @@ await getSongsFromPlaylist("13555799996") await getSongsFromPlaylist("https://music.163.com/playlist?id=14348145982") await getSongsFromPlaylist("https://music.163.com/playlist?id=14392963638") await getSongsFromPlaylist("https://music.163.com/playlist?id=580208139") + +// TODO: Filter out non-Japanese songs diff --git a/src/routes/song/[slug]/+page.svelte b/src/routes/song/[slug]/+page.svelte index 9562fc6..b4463d5 100644 --- a/src/routes/song/[slug]/+page.svelte +++ b/src/routes/song/[slug]/+page.svelte @@ -77,7 +77,8 @@ } $effect(() => inputChanged(inp, false)) - + + let progress = $derived(Math.min(100, Math.floor((states.flat().filter(s => s !== 'unseen').length / states.flat().length) * 100))) a.name).join(", ") + " - " + data.brief.album} right={[ @@ -85,13 +86,26 @@ {icon: "i-material-symbols:more-vert", onclick: () => alert('More clicked')} ]} /> - + - { - inputChanged(inp, true) - console.log("Event: input") -}} bind:value={inp} class="absolute opacity-0 top-[-9999px] left-[-9999px]" /> + inputChanged(inp, true)} bind:value={inp} class="absolute opacity-0 top-[-9999px] left-[-9999px]" /> + +
+
+
速度: 10cpm
+
正確率: 90%
+
+
+ +
正确:{states.flat().filter(s => s === 'right').length}
+
模糊:{states.flat().filter(s => s === 'fuzzy').length}
+
错误:{states.flat().filter(s => s === 'wrong').length}
+
剩余:{states.flat().filter(s => s === 'unseen').length}
+
+
+ +
{#each processedLrc as line, l}