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">
|
<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)"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in new issue
Block a user