Skip to content

Commit 9cac1df

Browse files
authored
Merge pull request #73 from qianmoQ/dev-25.0.6
feat: 支持 Java 语言环境安装
2 parents b912dad + 514ee1d commit 9cac1df

File tree

8 files changed

+708
-21
lines changed

8 files changed

+708
-21
lines changed

src-tauri/Cargo.lock

Lines changed: 30 additions & 13 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
@@ -17,7 +17,7 @@ chrono = { version = "0.4.41", features = ["serde"] }
1717
tauri = { version = "2.9", features = ["devtools", "protocol-asset"] }
1818
tauri-plugin-opener = "2.5"
1919
tauri-plugin-shell = "2.0"
20-
tauri-plugin-dialog = "2.4"
20+
tauri-plugin-dialog = "2.6"
2121
tauri-plugin-fs = "2.4.2"
2222
serde = { version = "1", features = ["derive"] }
2323
serde_json = "1"

src-tauri/src/env_commands.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,16 @@ pub async fn switch_environment_version(
4646
) -> Result<(), String> {
4747
info!("切换 {} 到版本 {}", language, version);
4848
let manager = env_manager.lock().await;
49-
manager
50-
.switch_version(&language, &version, app_handle)
51-
.await
49+
let result = manager
50+
.switch_version(&language, &version, app_handle.clone())
51+
.await;
52+
53+
if result.is_ok() {
54+
app_handle.emit("config-updated", ()).ok();
55+
info!("已发送配置更新事件");
56+
}
57+
58+
result
5259
}
5360

5461
#[tauri::command]

0 commit comments

Comments
 (0)