Merge pull request #10 from saturnclientmc/fix-windows

Fix windows
This commit is contained in:
Kr4ight
2026-04-05 03:22:46 +02:00
committed by GitHub
4 changed files with 16 additions and 4 deletions
+2 -1
View File
@@ -5,6 +5,7 @@
"windows": ["main"],
"permissions": [
"core:default",
"opener:default"
"opener:default",
"core:window:allow-show"
]
}
+3 -1
View File
@@ -50,6 +50,7 @@ pub fn auth_create_link(app: AppHandle) -> Result<String, String> {
let app_handle = app.clone();
std::thread::spawn(move || {
tauri::WebviewWindowBuilder::new(&app, "auth", tauri::WebviewUrl::External(url))
.title("Microsoft Login")
.inner_size(500.0, 700.0)
@@ -74,7 +75,8 @@ pub fn auth_create_link(app: AppHandle) -> Result<String, String> {
true
})
.build()
.map_err(|e| e.to_string())?;
.map_err(|e| e.to_string()).unwrap();
});
Ok(link)
}
+3 -1
View File
@@ -14,7 +14,9 @@
{
"title": "saturn-launcher",
"width": 1000,
"height": 650
"height": 650,
"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} />