Hide the window until loading is done

This commit is contained in:
Lncvrt committed 2026-05-10 08:19:34 -07:00
1 parent 7103d0e3a1
commit 0f1c84c3c9
6 files changed
+14 -19

No files matched your search

+7 -18
View File
@@ -743,11 +743,15 @@ export default function RootLayout ({
return
}
setLoading(false)
if (!(await isPermissionGranted())) {
await requestPermission()
}
setLoading(false)
const window = getCurrentWindow()
await window.show()
await window.setFocus()
})()
}, [])
@@ -841,22 +845,7 @@ export default function RootLayout ({
<>
<html lang='en' className={roboto.className}>
<body className={theme + '-theme'}>
{loading ? (
<>
{platformName == 'windows' && (
<div className='relative z-2 w-screen border-b border-b-(--col3) h-8.25 bg-(--col1)' />
)}
<div
className={`w-screen ${
platformName == 'windows'
? 'h-[calc(100vh-64px)]'
: 'h-screen'
} flex items-center justify-center`}
>
<p className='text-7xl text-center'>Loading...</p>
</div>
</>
) : (
{!loading && (
<GlobalProvider
value={{
serverVersionList,