Fix: blank page for 3 seconds when loading

This commit is contained in:
Kr4ight
2026-04-05 03:20:38 +02:00
parent 369d7e889c
commit d3bdd1d3a5
3 changed files with 11 additions and 2 deletions
+2 -1
View File
@@ -5,6 +5,7 @@
"windows": ["main"],
"permissions": [
"core:default",
"opener:default"
"opener:default",
"core:window:allow-show"
]
}
+2 -1
View File
@@ -15,7 +15,8 @@
"title": "saturn-launcher",
"width": 1000,
"height": 650,
"backgroundColor": "#0a0a0a"
"backgroundColor": "#0a0a0a",
"visible": false
}
],
"security": {
+7
View File
@@ -8,6 +8,7 @@ import { versions } from "./lib/launcher";
import { GameVersion } from "./lib/types";
import { MinecraftAccount } from "./lib/auth";
import { getVersion, updateVersion } from "./lib/saturn";
import { getCurrentWindow } from "@tauri-apps/api/window";
type Section = "play" | "mods" | "settings";
@@ -61,6 +62,12 @@ export default function App() {
if (selectedVersion?.id) updateVersion(selectedVersion?.id);
}, [selectedVersion]);
useEffect(() => {
const window = getCurrentWindow();
window.show();
}, []);
return (
<div className="flex h-screen">
<Sidebar active={active} setActive={setActive} />