Skip to content

Commit f275322

Browse files
committed
Update dependencies in Cargo.lock and Cargo.toml, add new file handling capabilities in default.json, and modify command logic in cmds.rs for improved functionality.
1 parent ecc2281 commit f275322

4 files changed

Lines changed: 108 additions & 2 deletions

File tree

src-tauri/Cargo.lock

Lines changed: 101 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ futures = "0.3.31"
3232
encoding_rs = "0.8"
3333
notify-rust = "4.11.7"
3434
tauri-plugin-os = "2.0.0"
35-
tauri-plugin-fs = "2.0.0"
35+
tauri-plugin-fs = { version = "2.0.0-rc", features = ["watch"] }
3636
tauri-plugin-dialog = "2.0.0"
3737
tauri-plugin-http = { version = "2", features = ["unsafe-headers"] }
3838
tauri-plugin-clipboard-manager = "2.0.0"

src-tauri/capabilities/default.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@
159159
"fs:allow-appconfig-write",
160160
"fs:allow-appconfig-write-recursive",
161161
"fs:allow-appdata-write",
162-
"fs:allow-appdata-write-recursive"
162+
"fs:allow-appdata-write-recursive",
163+
"fs:allow-watch",
164+
"fs:allow-unwatch",
165+
"fs:allow-read-dir",
166+
"fs:allow-copy-file"
163167
]
164168
}

src-tauri/src/command/cmds.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ pub async fn preview_from_config(
8787
Err(e) => eprintln!("Failed to resize window: {}", e),
8888
}
8989
} else {
90+
// existing_window.eval(js)
9091
existing_window.close().unwrap();
9192
let start = Instant::now();
9293
while handle.get_webview_window(window_label).is_some() {

0 commit comments

Comments
 (0)