disable SW for now, fix lyrics, comment release for win

This commit is contained in:
vapormusic 2021-12-17 21:54:49 +07:00
parent 9542e3ce6b
commit 08874c70ea
4 changed files with 29 additions and 20 deletions

View file

@ -1842,12 +1842,12 @@ document.addEventListener('musickitloaded', function () {
request.send();
});
if ('serviceWorker' in navigator) {
// Use the window load event to keep the page load performant
window.addEventListener('load', () => {
navigator.serviceWorker.register('sw.js?v=1');
});
}
// if ('serviceWorker' in navigator) {
// // Use the window load event to keep the page load performant
// window.addEventListener('load', () => {
// navigator.serviceWorker.register('sw.js?v=1');
// });
// }
function uuidv4() {
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>

View file

@ -1351,6 +1351,14 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
flex-flow: column;
}
.lyric-body .no-lyrics {
width: 100%;
justify-content: center;
align-items: center;
font-weight: bold;
font-size: 26px;
}
.lyric-line {
--bgSpeed: 1s;
appearance: none;

View file

@ -1,6 +1,6 @@
<script type="text/x-template" id="lyrics-view">
<div ref="lyricsview" class="md-body lyric-body">
<template v-if="lyrics && lyrics != []">
<template v-if="lyrics && lyrics != [] && lyrics.length > 0">
<template v-for="(lyric, index) in lyrics" v-if="lyric.line != 'lrcInstrumental'">
<h3 class="lyric-line" @click="if(lyric.startTime != 9999999) app.seekTo(lyric.startTime, false)"
v-bind:line-index="index.toString()">
@ -34,7 +34,8 @@
</template>
</template>
<template v-else>
No Lyrics Available
<div class="no-lyrics">
Loading... / Lyrics not found./ Instrumental.
</template>
</div>
</script>