Merge pull request #60 from cwillisf/show-loading-screen-sooner

Show main window ASAP, even if it's just a loading screen
This commit is contained in:
Chris Willis-Ford 2019-07-26 23:47:00 -07:00 committed by GitHub
commit b452eba142
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 1 deletions

View file

@ -3,6 +3,7 @@
"webpackConfig": "webpack.main.additions.js"
},
"renderer": {
"template": "src/renderer/index.html",
"webpackConfig": "webpack.renderer.additions.js"
}
}

25
src/renderer/index.html Normal file
View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body {
background-color: #4D97FF;
}
.splash {
color: white;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: xx-large;
font-weight: bolder;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
</head>
<body>
<div id="app"><p class="splash">Scratch Desktop is loading...</p></div>
</body>
</html>

View file

@ -1 +1,3 @@
import './app.jsx';
// this is an async import so that it doesn't block the first render
// index.html contains a loading/splash screen which will display while this import loads
import('./app.jsx');