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

@@ -610,13 +610,22 @@ pub async fn open_push_window(
}
#[tauri::command]
pub async fn open_project_boot_window(app: AppHandle) -> Result<(), AppCommandError> {
pub async fn open_project_boot_window(
app: AppHandle,
source: Option<String>,
) -> Result<(), AppCommandError> {
if let Some(existing) = app.get_webview_window("project-boot") {
ensure_windows_undecorated(&existing);
let _ = existing.unminimize();
existing.set_focus().map_err(|e| {
AppCommandError::window("Failed to focus project boot window", e.to_string())
})?;
// Close welcome if opened from welcome
if source.as_deref() == Some("welcome") {
if let Some(w) = app.get_webview_window("welcome") {
let _ = w.close();
}
}
return Ok(());
}
@@ -633,5 +642,12 @@ pub async fn open_project_boot_window(app: AppHandle) -> Result<(), AppCommandEr
})?;
ensure_windows_undecorated(&window);
// Close welcome if opened from welcome
if source.as_deref() == Some("welcome") {
if let Some(w) = app.get_webview_window("welcome") {
let _ = w.close();
}
}
Ok(())
}