@@ -5,6 +5,7 @@
|
|||||||
"windows": ["main"],
|
"windows": ["main"],
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"core:default",
|
"core:default",
|
||||||
"opener:default"
|
"opener:default",
|
||||||
|
"core:window:allow-show"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ pub fn auth_create_link(app: AppHandle) -> Result<String, String> {
|
|||||||
|
|
||||||
let app_handle = app.clone();
|
let app_handle = app.clone();
|
||||||
|
|
||||||
|
std::thread::spawn(move || {
|
||||||
tauri::WebviewWindowBuilder::new(&app, "auth", tauri::WebviewUrl::External(url))
|
tauri::WebviewWindowBuilder::new(&app, "auth", tauri::WebviewUrl::External(url))
|
||||||
.title("Microsoft Login")
|
.title("Microsoft Login")
|
||||||
.inner_size(500.0, 700.0)
|
.inner_size(500.0, 700.0)
|
||||||
@@ -74,7 +75,8 @@ pub fn auth_create_link(app: AppHandle) -> Result<String, String> {
|
|||||||
true
|
true
|
||||||
})
|
})
|
||||||
.build()
|
.build()
|
||||||
.map_err(|e| e.to_string())?;
|
.map_err(|e| e.to_string()).unwrap();
|
||||||
|
});
|
||||||
|
|
||||||
Ok(link)
|
Ok(link)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,9 @@
|
|||||||
{
|
{
|
||||||
"title": "saturn-launcher",
|
"title": "saturn-launcher",
|
||||||
"width": 1000,
|
"width": 1000,
|
||||||
"height": 650
|
"height": 650,
|
||||||
|
"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