Fix: blank page for 3 seconds when loading
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
"windows": ["main"],
|
"windows": ["main"],
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"core:default",
|
"core:default",
|
||||||
"opener:default"
|
"opener:default",
|
||||||
|
"core:window:allow-show"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,8 @@
|
|||||||
"title": "saturn-launcher",
|
"title": "saturn-launcher",
|
||||||
"width": 1000,
|
"width": 1000,
|
||||||
"height": 650,
|
"height": 650,
|
||||||
"backgroundColor": "#0a0a0a"
|
"backgroundColor": "#0a0a0a",
|
||||||
|
"visible": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"security": {
|
"security": {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { versions } from "./lib/launcher";
|
|||||||
import { GameVersion } from "./lib/types";
|
import { GameVersion } from "./lib/types";
|
||||||
import { MinecraftAccount } from "./lib/auth";
|
import { MinecraftAccount } from "./lib/auth";
|
||||||
import { getVersion, updateVersion } from "./lib/saturn";
|
import { getVersion, updateVersion } from "./lib/saturn";
|
||||||
|
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||||
|
|
||||||
type Section = "play" | "mods" | "settings";
|
type Section = "play" | "mods" | "settings";
|
||||||
|
|
||||||
@@ -61,6 +62,12 @@ export default function App() {
|
|||||||
if (selectedVersion?.id) updateVersion(selectedVersion?.id);
|
if (selectedVersion?.id) updateVersion(selectedVersion?.id);
|
||||||
}, [selectedVersion]);
|
}, [selectedVersion]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const window = getCurrentWindow();
|
||||||
|
|
||||||
|
window.show();
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen">
|
<div className="flex h-screen">
|
||||||
<Sidebar active={active} setActive={setActive} />
|
<Sidebar active={active} setActive={setActive} />
|
||||||
|
|||||||
Reference in New Issue
Block a user