From 92f35d139b702b4605d0f11925b7e3a5e08abda9 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 4 Dec 2023 14:10:34 +0100 Subject: [PATCH] Allow project loading (#9) --- .gitmodules | 2 +- Ecdar-GUI-Web | 2 +- src-tauri/Cargo.toml | 3 ++- src-tauri/src/main.rs | 1 + src-tauri/tauri.conf.json | 13 ++++++++----- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitmodules b/.gitmodules index 9d1dde3..f51a327 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "Ecdar-GUI-Web"] path = Ecdar-GUI-Web - url = git@github.com:ECDAR-AAU-SW-P5/Ecdar-GUI-Web.git + url = https://github.com/ECDAR-AAU-SW-P5/Ecdar-GUI-Web.git diff --git a/Ecdar-GUI-Web b/Ecdar-GUI-Web index ad1acc1..7b93e3f 160000 --- a/Ecdar-GUI-Web +++ b/Ecdar-GUI-Web @@ -1 +1 @@ -Subproject commit ad1acc157fe74b3e6538cbd260e639e173d43afb +Subproject commit 7b93e3f8f03a538fb992c86fcbe53eafda5deed2 diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 7c761e7..5aa4acd 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -17,7 +17,8 @@ tauri-build = { version = "1.4.0", features = [ ] } [dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.4.0", features = [ "dialog-confirm", "dialog-open", "fs-create-dir", "fs-write-file", "fs-read-dir", "fs-exists", "fs-read-file"] } +tauri = { version = "1.4.0", features = [ "dialog-confirm", "dialog-save", "dialog-open", "fs-read-dir", "fs-create-dir", "fs-remove-dir", "fs-read-file", "fs-write-file", "fs-remove-file", "path-all" ] } +tauri-plugin-persisted-scope = "0.1.3" tonic = "0.10.2" rand = "0.8.5" tokio = "1.33.0" diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 76d3c71..daf2e89 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -13,6 +13,7 @@ ecdar_gui_macros::create_functions!(); fn main() { tauri::Builder::default() + .plugin(tauri_plugin_persisted_scope::init()) .setup(|app| { #[cfg(debug_assertions)] { diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 520e688..26a966a 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -12,12 +12,12 @@ }, "tauri": { "allowlist": { - "dialog": { + "dialog": { "ask": false, "confirm": true, "message": false, "open": true, - "save": false + "save": true }, "fs": { "readFile": true, @@ -25,10 +25,13 @@ "readDir": true, "copyFile": false, "createDir": true, - "removeDir": false, - "removeFile": false, + "removeDir": true, + "removeFile": true, "renameFile": false, - "exists": true + "exists": false + }, + "path": { + "all": true } }, "bundle": {