mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-17 06:46:05 +01:00
added a spinner for the pre-bootstrap phase
This commit is contained in:
@@ -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 [
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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()
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user