diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index 4cdbf49..ac1b518 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -5,6 +5,7 @@ "windows": ["main"], "permissions": [ "core:default", - "opener:default" + "opener:default", + "core:window:allow-show" ] } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 7cf5469..ec87aae 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -15,7 +15,8 @@ "title": "saturn-launcher", "width": 1000, "height": 650, - "backgroundColor": "#0a0a0a" + "backgroundColor": "#0a0a0a", + "visible": false } ], "security": { diff --git a/src/App.tsx b/src/App.tsx index 5e048f4..224b5df 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -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 (