Skip to content

Instantly share code, notes, and snippets.

@deleteman
Created January 10, 2023 23:00
Show Gist options
  • Save deleteman/26ed193ce5fc515fcc47a24c07b1c923 to your computer and use it in GitHub Desktop.
Save deleteman/26ed193ce5fc515fcc47a24c07b1c923 to your computer and use it in GitHub Desktop.
tauri::Builder::default()
.menu(menu)
.on_menu_event(|event| {
match event.menu_item_id() {
"quit" => {
std::process::exit(0);
}
"new" => {
event.window().emit("new-todo", "").unwrap();
}
_ => {}
}
})
.run(tauri::generate_context!())
.expect("error while running tauri application");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment