Merge branch 'feat/player-fullscreen'

This commit is contained in:
lucast committed 2026-04-05 12:10:13 +02:00
commit 686be7ca8a
2 files changed
+8 -4

No files matched your search

+7 -3
View File
@@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import LyricsDisplay from "./Fullscreen/LyricsDisplay.vue"
const fullscreen = useFullscreen() const fullscreen = useFullscreen()
const song = useSong() const song = useSong()
@@ -24,6 +22,12 @@ onMounted(() => {
window.removeEventListener("mousemove", handleMouseMove) window.removeEventListener("mousemove", handleMouseMove)
}) })
}) })
const nuxtApp = useNuxtApp()
nuxtApp.hook("page:finish", () => {
fullscreen.value = false
})
</script> </script>
<template> <template>
@@ -54,7 +58,7 @@ onMounted(() => {
<PlayerFullscreenTrackDisplay <PlayerFullscreenTrackDisplay
:show-buttons="mouseMovedRecently" :show-buttons="mouseMovedRecently"
/> />
<LyricsDisplay <PlayerFullscreenLyricsDisplay
:animation-duration="0.2" :animation-duration="0.2"
:offset="150" :offset="150"
:show-scroll-bar="mouseMovedRecently" :show-scroll-bar="mouseMovedRecently"
@@ -132,7 +132,7 @@ const finalTransform = computed(() => {
<p <p
v-for="(lyric, i) in parsedLyrics" v-for="(lyric, i) in parsedLyrics"
:key="lyric.time" :key="lyric.time"
:class="{ active: i == activeIndex }" :class="{ active: i == scrollActiveIndex }"
ref="lyrics" ref="lyrics"
@click="() => (secondsPlayed = lyric.time)" @click="() => (secondsPlayed = lyric.time)"
> >