From 58dac271860bf62a774298fc43e154a17b898341 Mon Sep 17 00:00:00 2001
From: Geometrically <18202329+Geometrically@users.noreply.github.com>
Date: Fri, 23 Aug 2024 13:50:02 -0500
Subject: [PATCH] Fix MRPACK export file include, add webview2 fail msg, fix
window state (#2273)
* Fix MRPACK export file include, add webview2 fail msg, fix window state
* fix limt
---
Cargo.lock | 71 +++++++++++++++++++++++++
apps/app-frontend/src/App.vue | 12 +----
apps/app/Cargo.toml | 2 +
apps/app/src/main.rs | 64 ++++++++++++++++++----
packages/app-lib/src/api/profile/mod.rs | 4 +-
5 files changed, 131 insertions(+), 22 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 79689f778..a25761b6f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -92,6 +92,12 @@ version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
+[[package]]
+name = "ascii"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16"
+
[[package]]
name = "async-broadcast"
version = "0.5.1"
@@ -2379,6 +2385,15 @@ version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
+[[package]]
+name = "itertools"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
+dependencies = [
+ "either",
+]
+
[[package]]
name = "itoa"
version = "0.4.8"
@@ -2732,6 +2747,29 @@ dependencies = [
"windows-sys 0.52.0",
]
+[[package]]
+name = "native-dialog"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "84e7038885d2aeab236bd60da9e159a5967b47cde3292da3b15ff1bec27c039f"
+dependencies = [
+ "ascii",
+ "block",
+ "cocoa 0.25.0",
+ "core-foundation",
+ "dirs-next",
+ "objc",
+ "objc-foundation",
+ "objc_id",
+ "once_cell",
+ "raw-window-handle",
+ "thiserror",
+ "versions",
+ "wfd",
+ "which",
+ "winapi",
+]
+
[[package]]
name = "ndk"
version = "0.6.0"
@@ -5133,6 +5171,7 @@ dependencies = [
"dirs",
"futures",
"lazy_static",
+ "native-dialog",
"objc",
"once_cell",
"opener",
@@ -5665,6 +5704,16 @@ version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+[[package]]
+name = "versions"
+version = "5.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c73a36bc44e3039f51fbee93e39f41225f6b17b380eb70cc2aab942df06b34dd"
+dependencies = [
+ "itertools",
+ "nom",
+]
+
[[package]]
name = "void"
version = "1.0.2"
@@ -5935,6 +5984,28 @@ dependencies = [
"windows-metadata",
]
+[[package]]
+name = "wfd"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e713040b67aae5bf1a0ae3e1ebba8cc29ab2b90da9aa1bff6e09031a8a41d7a8"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "which"
+version = "4.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
+dependencies = [
+ "either",
+ "home",
+ "once_cell",
+ "rustix 0.38.34",
+]
+
[[package]]
name = "whoami"
version = "1.5.1"
diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue
index 5c0c095cc..819ddaf78 100644
--- a/apps/app-frontend/src/App.vue
+++ b/apps/app-frontend/src/App.vue
@@ -126,6 +126,7 @@ initialize_state()
})
const handleClose = async () => {
+ await saveWindowState(StateFlags.ALL)
await TauriWindow.getCurrent().close()
}
@@ -293,16 +294,7 @@ async function handleCommand(e) {
-