mirror of https://github.com/Lissy93/dashy.git
⚡ Improved pre-app loading experience
This commit is contained in:
parent
d9e04564a0
commit
ad677de933
|
@ -21,14 +21,18 @@
|
||||||
<!-- Loading screen, will be replaced when app loaded -->
|
<!-- Loading screen, will be replaced when app loaded -->
|
||||||
<div class="loading-placeholder" id="loader">
|
<div class="loading-placeholder" id="loader">
|
||||||
<h1>Dashy</h1>
|
<h1>Dashy</h1>
|
||||||
<p class="loading">Loading...</p>
|
<p class="loading">Loading... </p>
|
||||||
<!-- Error message, only visible if app not mounted within 5 secs -->
|
<!-- Error message, only visible if app not mounted within 5 secs -->
|
||||||
<div class="catastrophic-error" id="err-wrap" style="display:none;">
|
<div class="catastrophic-error" id="err-wrap" style="display:none;">
|
||||||
<p class="err-l1">It looks like something's gone wrong...</p>
|
<p class="err-l1">It looks like something's gone wrong...</p>
|
||||||
<p class="err-l2">
|
<p class="err-l2">
|
||||||
Check the browser console, and
|
This is likely caused by the app source not being found at the current domain
|
||||||
<a href="https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md">raise a ticket</a>
|
</p>
|
||||||
if you need additional support
|
<p class="err-l2">
|
||||||
|
If you need additional support, check the browser console then
|
||||||
|
<a href="https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md">
|
||||||
|
raise a ticket
|
||||||
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,7 +47,6 @@
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const loaderElem = document.getElementById('loader');
|
const loaderElem = document.getElementById('loader');
|
||||||
if (loaderElem) loaderElem.classList.add('still-not-loaded');
|
if (loaderElem) loaderElem.classList.add('still-not-loaded');
|
||||||
console.log('Will display error message');
|
|
||||||
}, 7500);
|
}, 7500);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -17,6 +17,7 @@ body { margin: 0; }
|
||||||
}
|
}
|
||||||
#app .loading-placeholder h1 {
|
#app .loading-placeholder h1 {
|
||||||
font-size: 20vh;
|
font-size: 20vh;
|
||||||
|
margin: 1rem auto;
|
||||||
font-family: Tahoma, monospace;
|
font-family: Tahoma, monospace;
|
||||||
cursor: progress;
|
cursor: progress;
|
||||||
color: #0c0c0c;
|
color: #0c0c0c;
|
||||||
|
@ -24,9 +25,13 @@ body { margin: 0; }
|
||||||
}
|
}
|
||||||
#app .loading-placeholder p.loading {
|
#app .loading-placeholder p.loading {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
|
opacity: 0.75;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
cursor: progress;
|
cursor: progress;
|
||||||
color: #0c0c0c;
|
color: #0c0c0c;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
text-shadow: 0 1px 1px #090909, 0 0 0 #000, 0 1px 1px #000000;
|
text-shadow: 0 1px 1px #090909, 0 0 0 #000, 0 1px 1px #000000;
|
||||||
}
|
}
|
||||||
#app .loading-placeholder .catastrophic-error p {
|
#app .loading-placeholder .catastrophic-error p {
|
||||||
|
@ -39,8 +44,10 @@ body { margin: 0; }
|
||||||
text-shadow: 1px 2px 1px #090909, 0 0 0 #000, 0 1px 1px #000000
|
text-shadow: 1px 2px 1px #090909, 0 0 0 #000, 0 1px 1px #000000
|
||||||
}
|
}
|
||||||
#app .loading-placeholder .catastrophic-error p.err-l2 {
|
#app .loading-placeholder .catastrophic-error p.err-l2 {
|
||||||
|
opacity: 0.75;
|
||||||
font-size: 2vh;
|
font-size: 2vh;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
padding: 0 1rem;
|
||||||
}
|
}
|
||||||
#app .loading-placeholder .catastrophic-error p.err-l2 a {
|
#app .loading-placeholder .catastrophic-error p.err-l2 a {
|
||||||
color: #e11a4bfc;
|
color: #e11a4bfc;
|
||||||
|
@ -53,4 +60,4 @@ body { margin: 0; }
|
||||||
#app .loading-placeholder .catastrophic-error p { font-size: 2.5vh !important; }
|
#app .loading-placeholder .catastrophic-error p { font-size: 2.5vh !important; }
|
||||||
#app .loading-placeholder .catastrophic-error p.err-l2 { font-size: 1.2vh !important; }
|
#app .loading-placeholder .catastrophic-error p.err-l2 { font-size: 1.2vh !important; }
|
||||||
}
|
}
|
||||||
::selection { background-color: #db78fc; color: #121212; }
|
::selection { background-color: #e11a4bfc; color: #121212; }
|
||||||
|
|
Loading…
Reference in New Issue