Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.
Rust chatgptclaudeclidesktopdesktop-appelectron-alternativegeminilinuxmacosnativefierno-electronrusttauriweb-to-desktopwebsite-to-appwebviewwindowsyoutube
:bug: Solve the problem of window remembering position
Tw931e704cf6171d
diff --git a/dist/cli.js b/dist/cli.jsindex b7a0e57f..05401361 100755--- a/dist/cli.js+++ b/dist/cli.js@@ -22,7 +22,7 @@ import sharp from 'sharp';import * as psl from 'psl';var name = "pake-cli";-var version = "3.2.12";+var version = "3.2.13";var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。";var engines = {node: ">=16.0.0"diff --git a/package-lock.json b/package-lock.jsonindex d2ca1462..ca8f7ade 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "pake-cli",- "version": "3.2.11",+ "version": "3.2.12","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "pake-cli",- "version": "3.2.11",+ "version": "3.2.12","license": "MIT","dependencies": {"@tauri-apps/api": "^2.8.0",diff --git a/package.json b/package.jsonindex fc5789a6..73384eb7 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "pake-cli",- "version": "3.2.12",+ "version": "3.2.13","description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。","engines": {"node": ">=16.0.0"diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rsindex 08666704..16726a47 100644--- a/src-tauri/src/lib.rs+++ b/src-tauri/src/lib.rs@@ -51,8 +51,14 @@ pub fn run_app() {let window = set_window(app, &pake_config, &tauri_config);set_system_tray(app.app_handle(), show_system_tray).unwrap();set_global_shortcut(app.app_handle(), activation_shortcut).unwrap();- // Prevent flickering on the first open.- window.show().unwrap();++ // Show window after state restoration to prevent position flashing+ let window_clone = window.clone();+ tauri::async_runtime::spawn(async move {+ tokio::time::sleep(tokio::time::Duration::from_millis(50)).await;+ window_clone.show().unwrap();+ });+Ok(())}).on_window_event(move |_window, _event| {