fix: queue panel fetches data on open, lyrics auto-sync with playback time

- Player store tracks playStartedAt/pausedElapsed for elapsed time
- Queue component fetches from server when opened
- Lyrics page syncs every 200ms using elapsed time
- Lyrics auto-scroll to active line with smooth animation
- Translation lines shown below main lyrics
- Fade mask on lyrics scroll area

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
saopig1andClaude Opus 4.6 committed 2026-03-30 02:12:12 +08:00
1 parent 67584d2622
commit 9dce883384
3 files changed
+193 -22

No files matched your search

+9 -2
View File
@@ -33,12 +33,13 @@
</template>
<script setup lang="ts">
import { watch } from 'vue';
import { Icon } from '@iconify/vue';
import axios from 'axios';
import { usePlayerStore } from '../stores/player.js';
import CoverArt from './CoverArt.vue';
defineProps<{
const props = defineProps<{
open: boolean;
}>();
@@ -48,10 +49,16 @@ defineEmits<{
const store = usePlayerStore();
// Fetch queue when panel opens
watch(() => props.open, (isOpen) => {
if (isOpen) store.fetchQueue();
});
async function removeSong(index: number) {
if (!store.activeBotId) return;
try {
await axios.delete(`/api/player/${store.activeBotId}/queue/${index}`);
await axios.delete(`/api/player/${store.activeBotId}/queue/${index + 1}`);
await store.fetchQueue();
} catch {
// Ignore
}