Files
DPM/src-tauri/src/lib.rs
T

23 lines
659 B
Rust
Raw Normal View History

2026-05-12 23:19:37 +08:00
mod events;
mod models;
mod server;
mod storage;
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");
}