Handle songs without lyrics in player
This commit is contained in:
1 parent
8ee6164218
commit
fdf2aeb675
2 files changed
+3
-3
No files matched your search
@@ -54,7 +54,7 @@ nuxtApp.hook("page:finish", () => {
|
|||||||
@click="closeFullscreen()"
|
@click="closeFullscreen()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="content-container" :class="{ lyrics: song.lyrics }">
|
<div class="content-container" :class="{ lyrics: song.lyrics?.text }">
|
||||||
<PlayerFullscreenTrackDisplay :show-buttons="mouseMovedRecently" />
|
<PlayerFullscreenTrackDisplay :show-buttons="mouseMovedRecently" />
|
||||||
<PlayerFullscreenLyricsDisplay
|
<PlayerFullscreenLyricsDisplay
|
||||||
:animation-duration="0.2"
|
:animation-duration="0.2"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const { fullscreen } = useFullscreen()
|
|||||||
const { secondsPlayed } = usePlayer()
|
const { secondsPlayed } = usePlayer()
|
||||||
|
|
||||||
const parsedLyrics = computed(() => {
|
const parsedLyrics = computed(() => {
|
||||||
if (!song.value || !song.value.lyrics.synced) return
|
if (!song.value?.lyrics?.synced) return
|
||||||
|
|
||||||
if (song.value.lyrics.synced) return parseLyrics(song.value.lyrics.text)
|
if (song.value.lyrics.synced) return parseLyrics(song.value.lyrics.text)
|
||||||
})
|
})
|
||||||
@@ -169,7 +169,7 @@ const finalTransform = computed(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else-if="song && song.lyrics && song.lyrics.text"
|
v-else-if="song?.lyrics?.text"
|
||||||
class="lyrics"
|
class="lyrics"
|
||||||
:style="{
|
:style="{
|
||||||
height: `${height}px`,
|
height: `${height}px`,
|
||||||
|
|||||||
Reference in new issue
Block a user