Skip to content

Commit 7e122fe

Browse files
authored
feat: Improve app startup time (#1144)
1 parent 38d5967 commit 7e122fe

19 files changed

+153
-280
lines changed

forge.config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ const config: ForgeConfig = {
6262
'./resources/json_output.py',
6363
'./resources/entrypoint.js',
6464
'./resources/replay.js',
65-
'./resources/splashscreen.html',
66-
'./resources/logo-splashscreen-dark.svg',
67-
'./resources/logo-splashscreen.svg',
6865
...getPlatformSpecificResources(),
6966
],
7067
windowsSign,

index.html

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,37 @@
1313
<title>Grafana k6 Studio</title>
1414
</head>
1515
<body>
16-
<div id="root"></div>
16+
<div id="root">
17+
<div class="app-loading">
18+
<div class="app-loading-spinner"></div>
19+
</div>
20+
</div>
21+
<style>
22+
body { margin: 0; }
23+
.app-loading {
24+
display: flex;
25+
align-items: center;
26+
justify-content: center;
27+
height: 100dvh;
28+
background: #fff;
29+
}
30+
.app-loading-spinner {
31+
width: 24px;
32+
height: 24px;
33+
border: 2px solid #e5e5e5;
34+
border-top-color: #999;
35+
border-radius: 50%;
36+
animation: spin 0.6s linear infinite;
37+
}
38+
@keyframes spin { to { transform: rotate(360deg); } }
39+
@media (prefers-color-scheme: dark) {
40+
.app-loading { background: #111110; }
41+
.app-loading-spinner {
42+
border-color: #333;
43+
border-top-color: #888;
44+
}
45+
}
46+
</style>
1747
<script type="module" src="/src/renderer.ts"></script>
1848
</body>
1949
</html>

resources/logo-splashscreen-dark.svg

Lines changed: 0 additions & 19 deletions
This file was deleted.

resources/logo-splashscreen.svg

Lines changed: 0 additions & 19 deletions
This file was deleted.

resources/splashscreen.html

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)