diff --git a/runtime/Cargo.lock b/runtime/Cargo.lock index 44b11a6..98a766e 100644 --- a/runtime/Cargo.lock +++ b/runtime/Cargo.lock @@ -326,6 +326,15 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -2199,6 +2208,7 @@ dependencies = [ "serde_json", "tauri", "tauri-build", + "tauri-plugin-window-state", "tokio", ] @@ -3909,6 +3919,20 @@ dependencies = [ "tauri-utils", ] +[[package]] +name = "tauri-plugin-window-state" +version = "0.1.1" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#5e3900e682e13f3759b439116ae2f77a6d389ca2" +dependencies = [ + "bincode", + "bitflags 2.5.0", + "log", + "serde", + "serde_json", + "tauri", + "thiserror", +] + [[package]] name = "tauri-runtime" version = "0.14.2" diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 5bedf94..50a4c8a 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -10,6 +10,7 @@ tauri-build = { version = "1.5", features = [] } [dependencies] tauri = { version = "1.6", features = [ "http-all", "shell-sidecar", "path-all", "shell-open"] } +tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" keyring = "2" diff --git a/runtime/src/main.rs b/runtime/src/main.rs index 06b94e5..56097cf 100644 --- a/runtime/src/main.rs +++ b/runtime/src/main.rs @@ -187,6 +187,7 @@ fn main() { *main_window.lock().unwrap() = Some(window); Ok(()) }) + .plugin(tauri_plugin_window_state::Builder::default().build()) .invoke_handler(tauri::generate_handler![store_secret, get_secret, delete_secret, set_clipboard]) .run(tauri::generate_context!()) .expect("Error while running Tauri application");