added a spinner for the pre-bootstrap phase

This commit is contained in:
Eugene Pankov
2021-11-14 16:54:51 +01:00
parent dd5bf0773e
commit e1b0d01ac3
4 changed files with 56 additions and 3 deletions

View File

@@ -211,7 +211,7 @@ for key in [
'ENABLE_LOGIN', 'ENABLE_LOGIN',
'ENABLE_HOMEPAGE', 'ENABLE_HOMEPAGE',
]: ]:
globals()[key] = bool(globals()[key]) if globals()[key] else None globals()[key] = globals()[key] == 'True'
for key in [ for key in [

View File

@@ -0,0 +1,44 @@
.pre-bootstrap-spinner {
position: absolute;
bottom: 20px;
left: 50%;
width: 50px;
height: 20px;
margin-left: -25px;
.spinner {
display: inline-block;
position: relative;
width: 10px;
height: 10px;
border-radius: 50%;
background: #fff;
animation: spinner ease infinite 1s;
opacity: 0.7;
&.n2 {
animation-delay: -0.33s;
}
&.n3 {
animation-delay: -0.66s;
}
}
}
@keyframes spinner {
0% {
left: -20px;
top: 0;
}
50% {
left: 20px;
top: 0;
}
100% {
left: -20px;
top: 0;
}
}

View File

@@ -17,5 +17,10 @@
</div> </div>
</div> </div>
</app-root> </app-root>
<div class="pre-bootstrap-spinner">
<div class="spinner"></div>
<div class="spinner n2"></div>
<div class="spinner n3"></div>
</div>
</body> </body>
</html> </html>

View File

@@ -55,7 +55,7 @@ async function start () {
}) })
const config = connector.loadConfig() const config = connector.loadConfig()
tabby.bootstrap({ await tabby.bootstrap({
packageModules: pluginModules, packageModules: pluginModules,
bootstrapData: { bootstrapData: {
config, config,
@@ -69,4 +69,8 @@ async function start () {
connector, connector,
}) })
} }
start()
const spinner = document.body.querySelector('.pre-bootstrap-spinner')
start().finally(() => {
spinner?.remove()
})