lots more progress on apple music integration

This commit is contained in:
janis
2023-11-16 14:35:23 +01:00
parent 59b9a39db3
commit 5a133e3f12
10 changed files with 218 additions and 19 deletions

View File

@@ -11,6 +11,10 @@
</head>
<body>
<div class="info">Designed and developed by Janis Hutz <a href="https://janishutz.com" target="_blank" style="text-decoration: none; color: white;">https://janishutz.com</a></div>
<div class="content loading" id="loading">
<h1>Loading...</h1>
<p>Please wait</p>
</div>
<div class="content" id="app">
<div v-if="hasLoaded" style="width: 100%">
<div class="current-song-wrapper">

View File

@@ -21,12 +21,21 @@ body {
.content {
width: 100%;
display: flex;
display: none;
justify-content: center;
align-items: center;
flex-direction: column;
}
.loaded {
display: block;
}
.loading {
display: flex;
height: 100vh;
}
.playing-symbols {
position: absolute;
left: 10vw;

View File

@@ -98,6 +98,16 @@ createApp( {
source.onopen = () => {
this.hasLoaded = true;
if ( document.fonts.status === 'loaded' ) {
document.getElementById( 'loading' ).classList.remove( 'loading' );
document.getElementById( 'app' ).classList.add( 'loaded' );
} else {
document.fonts.onloadingdone = () => {
document.getElementById( 'loading' ).classList.remove( 'loading' );
document.getElementById( 'app' ).classList.add( 'loaded' );
};
}
};
let self = this;