Hide the window until loading is done
This commit is contained in:
6 files changed
+14
-19
No files matched your search
@@ -18,6 +18,7 @@
|
|||||||
"core:window:allow-start-dragging",
|
"core:window:allow-start-dragging",
|
||||||
"core:window:allow-toggle-maximize",
|
"core:window:allow-toggle-maximize",
|
||||||
"core:window:allow-request-user-attention",
|
"core:window:allow-request-user-attention",
|
||||||
|
"core:window:allow-show",
|
||||||
"core:webview:allow-create-webview-window",
|
"core:webview:allow-create-webview-window",
|
||||||
"fs:default",
|
"fs:default",
|
||||||
"fs:allow-remove",
|
"fs:allow-remove",
|
||||||
|
|||||||
@@ -836,6 +836,8 @@ async fn update(
|
|||||||
let mut new_url = window.url().unwrap();
|
let mut new_url = window.url().unwrap();
|
||||||
new_url.set_path("/update/updating");
|
new_url.set_path("/update/updating");
|
||||||
window.navigate(new_url).unwrap();
|
window.navigate(new_url).unwrap();
|
||||||
|
let _ = window.show();
|
||||||
|
let _ = window.set_focus();
|
||||||
|
|
||||||
let mut downloaded = 0;
|
let mut downloaded = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
"width": 1000,
|
"width": 1000,
|
||||||
"height": 600,
|
"height": 600,
|
||||||
"minWidth": 1000,
|
"minWidth": 1000,
|
||||||
"minHeight": 500
|
"minHeight": 500,
|
||||||
|
"visible": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"security": {
|
"security": {
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
"height": 600,
|
"height": 600,
|
||||||
"minWidth": 1000,
|
"minWidth": 1000,
|
||||||
"minHeight": 500,
|
"minHeight": 500,
|
||||||
|
"visible": false,
|
||||||
"titleBarStyle": "Overlay",
|
"titleBarStyle": "Overlay",
|
||||||
"hiddenTitle": true
|
"hiddenTitle": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
"height": 632,
|
"height": 632,
|
||||||
"minWidth": 1000,
|
"minWidth": 1000,
|
||||||
"minHeight": 532,
|
"minHeight": 532,
|
||||||
|
"visible": false,
|
||||||
"decorations": false,
|
"decorations": false,
|
||||||
"shadow": true
|
"shadow": true
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-18
@@ -743,11 +743,15 @@ export default function RootLayout ({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
setLoading(false)
|
|
||||||
|
|
||||||
if (!(await isPermissionGranted())) {
|
if (!(await isPermissionGranted())) {
|
||||||
await requestPermission()
|
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}>
|
<html lang='en' className={roboto.className}>
|
||||||
<body className={theme + '-theme'}>
|
<body className={theme + '-theme'}>
|
||||||
{loading ? (
|
{!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>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<GlobalProvider
|
<GlobalProvider
|
||||||
value={{
|
value={{
|
||||||
serverVersionList,
|
serverVersionList,
|
||||||
|
|||||||
Reference in new issue
Block a user