2026-08-18 01:43:25 +08:00
|
|
|
|
// 说明:早期 Rust 内嵌后端(server/storage/models/events,axum :10801)已随架构迁移到
|
|
|
|
|
|
// Python 后端(FastAPI :10085)而移除;当前 Rust 侧仅负责窗口与生命周期。
|
2026-05-12 22:38:52 +08:00
|
|
|
|
|
|
|
|
|
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
|
|
|
|
|
pub fn run() {
|
|
|
|
|
|
tauri::Builder::default()
|
|
|
|
|
|
.plugin(tauri_plugin_opener::init())
|
2026-05-14 15:07:41 +08:00
|
|
|
|
.plugin(tauri_plugin_autostart::init(
|
|
|
|
|
|
tauri_plugin_autostart::MacosLauncher::LaunchAgent,
|
|
|
|
|
|
Some(vec![]),
|
|
|
|
|
|
))
|
2026-05-14 15:39:12 +08:00
|
|
|
|
.on_window_event(|window, event| {
|
|
|
|
|
|
if let tauri::WindowEvent::CloseRequested { api, .. } = event {
|
|
|
|
|
|
api.prevent_close();
|
|
|
|
|
|
let _ = window.minimize();
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2026-05-12 22:38:52 +08:00
|
|
|
|
.run(tauri::generate_context!())
|
|
|
|
|
|
.expect("error while running tauri application");
|
|
|
|
|
|
}
|