Skip to content
Snippets Groups Projects
Unverified Commit 66ccbf70 authored by GyDi's avatar GyDi
Browse files

feat: support restart app on tray

parent cb48600b
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,7 @@ fn main() -> std::io::Result<()> {
.add_item(CustomMenuItem::new("system_proxy", "System Proxy"))
.add_item(CustomMenuItem::new("tun_mode", "Tun Mode"))
.add_item(CustomMenuItem::new("restart_clash", "Restart Clash"))
.add_item(CustomMenuItem::new("restart_app", "Restart App"))
.add_native_item(SystemTrayMenuItem::Separator)
.add_item(CustomMenuItem::new("quit", "Quit").accelerator("CmdOrControl+Q"));
......@@ -91,6 +92,9 @@ fn main() -> std::io::Result<()> {
let core = app_handle.state::<core::Core>();
crate::log_if_err!(core.restart_clash());
}
"restart_app" => {
api::process::restart(&app_handle.env());
}
"quit" => {
resolve::resolve_reset(app_handle);
app_handle.exit(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment