@@ -5,6 +5,7 @@
|
||||
"windows": ["main"],
|
||||
"permissions": [
|
||||
"core:default",
|
||||
"opener:default"
|
||||
"opener:default",
|
||||
"core:window:allow-show"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -50,7 +50,8 @@ pub fn auth_create_link(app: AppHandle) -> Result<String, String> {
|
||||
|
||||
let app_handle = app.clone();
|
||||
|
||||
tauri::WebviewWindowBuilder::new(&app, "auth", tauri::WebviewUrl::External(url))
|
||||
std::thread::spawn(move || {
|
||||
tauri::WebviewWindowBuilder::new(&app, "auth", tauri::WebviewUrl::External(url))
|
||||
.title("Microsoft Login")
|
||||
.inner_size(500.0, 700.0)
|
||||
.resizable(false)
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
{
|
||||
"title": "saturn-launcher",
|
||||
"width": 1000,
|
||||
"height": 650
|
||||
"height": 650,
|
||||
"backgroundColor": "#0a0a0a",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
|
||||
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user