@samitouri / QOSami-HFS / commits / 132884b3

fix: removed white-flash while reloading on a dark-themed system

Massimo Melina committed Oct 22, 2025 at 20:04 UTC 132884b33e69c41a3862de629eed9bec41db0a33
3 files changed +5 -2
frontend/index.html
+1 -1
@@ -7,7 +7,7 @@
7 <script type="module" src="/src/index.ts"></script>
8 </head>
9 <body>
10 - <style class="removeAtBoot">@media (prefers-color-scheme: dark) { html { background-color: #000; color: #888; } }</style>
10 + <style class="removeAtBoot">@media (prefers-color-scheme: dark) { html, #root { background-color: #000; color: #888; } }</style>
11 <div id="root">Wait for loading or <a href="?get=basic">use basic interface now</a></div>
12 <script>
13 function isModernBrowser() { // support BigInt
shared/index.ts
+3 -1
@@ -12,7 +12,9 @@ export * from '../src/cross'
12
13 ;(window as any)._ = _
14
15 -document.querySelectorAll('.removeAtBoot').forEach(e => e.remove())
15 +setTimeout(() => { // give some time for react to have started rendering
16 + document.querySelectorAll('.removeAtBoot').forEach(e => e.remove())
17 +}, 500)
18
19 // roughly 0.7 on m1 max
20 export const cpuSpeedIndex = (() => {
src/update.ts
+1
@@ -79,6 +79,7 @@ export async function getVersions(interrupt?: (r: Release) => boolean) {
79 }
80
81 export async function getUpdates(strict=false) {
82 + console.log("checking for updates")
83 void getProjectInfo() // also check for alerts and print them asap in the console
84 const stable: Release = prepareRelease(await getRepoInfo(HFS_REPO + '/releases/latest'))
85 const res = await getVersions(r => r.versionScalar < stable.versionScalar) // we don't consider betas before stable