Small refractoring
This commit is contained in:
1 parent
d5482a9ea4
commit
59af94de8c
2 files changed
+8
-4
No files matched your search
@@ -1,6 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import LyricsDisplay from "./Fullscreen/LyricsDisplay.vue"
|
||||
|
||||
const fullscreen = useFullscreen()
|
||||
const song = useSong()
|
||||
|
||||
@@ -24,6 +22,12 @@ onMounted(() => {
|
||||
window.removeEventListener("mousemove", handleMouseMove)
|
||||
})
|
||||
})
|
||||
|
||||
const nuxtApp = useNuxtApp()
|
||||
|
||||
nuxtApp.hook("page:finish", () => {
|
||||
fullscreen.value = false
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -54,7 +58,7 @@ onMounted(() => {
|
||||
<PlayerFullscreenTrackDisplay
|
||||
:show-buttons="mouseMovedRecently"
|
||||
/>
|
||||
<LyricsDisplay
|
||||
<PlayerFullscreenLyricsDisplay
|
||||
:animation-duration="0.2"
|
||||
:offset="150"
|
||||
:show-scroll-bar="mouseMovedRecently"
|
||||
|
||||
@@ -132,7 +132,7 @@ const finalTransform = computed(() => {
|
||||
<p
|
||||
v-for="(lyric, i) in parsedLyrics"
|
||||
:key="lyric.time"
|
||||
:class="{ active: i == activeIndex }"
|
||||
:class="{ active: i == scrollActiveIndex }"
|
||||
ref="lyrics"
|
||||
@click="() => (secondsPlayed = lyric.time)"
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user