folder增加项目启动器入口,优化窗口跳转

This commit is contained in:
xintaofei
2026-03-27 15:25:55 +08:00
parent 3b080c801b
commit ea77c5b0e8
20 changed files with 81 additions and 39 deletions

View File

@@ -140,6 +140,24 @@ pub fn run() {
});
}
if label == "project-boot"
&& matches!(
event,
tauri::WindowEvent::CloseRequested { .. } | tauri::WindowEvent::Destroyed
)
{
let app = window.app_handle();
if !APP_QUITTING.load(Ordering::Relaxed) {
let has_other = app
.webview_windows()
.keys()
.any(|l| *l != label && *l != "settings");
if !has_other {
let _ = windows::open_welcome_window(app);
}
}
}
if let tauri::WindowEvent::CloseRequested { .. } = event {
if label.starts_with("folder-") {
let app = window.app_handle();