added tests commands for modular ui elements

This commit is contained in:
booploops 2021-12-27 23:47:15 -08:00
parent b57fe0f3ac
commit df6ba93242
2 changed files with 199 additions and 153 deletions

View file

@ -279,6 +279,13 @@ const app = new Vue({
}, },
}, },
methods: { methods: {
modularUITest(val = false) {
if (val) {
document.querySelector("#app-main").classList.add("modular-fs")
} else {
document.querySelector("#app-main").classList.remove("modular-fs")
}
},
navigateBack() { navigateBack() {
history.back() history.back()
}, },
@ -420,7 +427,8 @@ const app = new Vue({
}) })
})},1500) })
}, 1500)
} }
@ -1619,7 +1627,8 @@ const app = new Vue({
const musicType = (MusicKit.getInstance().nowPlayingItem != null) ? MusicKit.getInstance().nowPlayingItem["type"] ?? '' : ''; const musicType = (MusicKit.getInstance().nowPlayingItem != null) ? MusicKit.getInstance().nowPlayingItem["type"] ?? '' : '';
console.log("mt", musicType) console.log("mt", musicType)
if (musicType === "musicVideo") { if (musicType === "musicVideo") {
this.loadYTLyrics();} else { this.loadYTLyrics();
} else {
if (app.cfg.lyrics.enable_mxm) { if (app.cfg.lyrics.enable_mxm) {
this.loadMXM(); this.loadMXM();
} else { this.loadAMLyrics(); } } else { this.loadAMLyrics(); }
@ -1688,7 +1697,8 @@ const app = new Vue({
const ttmlLyrics = this.responseText; const ttmlLyrics = this.responseText;
if (ttmlLyrics) { if (ttmlLyrics) {
this.lyricsMediaItem = ttmlLyrics this.lyricsMediaItem = ttmlLyrics
this.parseTTML()} this.parseTTML()
}
} catch (e) { } catch (e) {
app.loadMXM(); app.loadMXM();
} }
@ -2485,7 +2495,8 @@ document.addEventListener('musickitloaded', function () {
}); });
setTimeout(() => { setTimeout(() => {
app.init() app.init()
}, 1000)} }, 1000)
}
request.addEventListener("load", loadAlternateKey); request.addEventListener("load", loadAlternateKey);
request.open("GET", "https://raw.githubusercontent.com/lujjjh/LitoMusic/main/token.json"); request.open("GET", "https://raw.githubusercontent.com/lujjjh/LitoMusic/main/token.json");
request.send(); request.send();

View file

@ -2949,6 +2949,41 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
/* Cider */ /* Cider */
// Modular
.modular-fs {
.app-drawer {
width:100%;
right:0px;
top:0px;
height:100%;
border-radius: 0px;
box-shadow: unset;
background: black;
.lyric-body {
justify-content: center;
align-items:center;
.lyric-line {
pointer-events: none;
font-weight: 500;
font-size: 1.6em;
&:not(.active) {
display: none;
margin: 0;
transform: scale(1);
}
&.active {
margin: 0;
transform: scale(1);
}
}
}
}
}
// Modular
/* Transitions */ /* Transitions */
.modal-enter-active, .modal-enter-active,