Merge branch 'master' into jk/unify

This commit is contained in:
Jonathan Kelley committed 2022-01-21 00:16:45 -05:00
commit 824defa2db
21 files changed
+476 -91

No files matched your search

+14
View File
@@ -187,6 +187,20 @@ pub fn launch_with_props<P: 'static + Send>(
is_ready.store(true, std::sync::atomic::Ordering::Relaxed);
let _ = proxy.send_event(UserWindowEvent::Update);
}
"browser_open" => {
let data = req.params.unwrap();
log::trace!("Open browser: {:?}", data);
if let Some(arr) = data.as_array() {
if let Some(temp) = arr[0].as_object() {
if temp.contains_key("href") {
let url = temp.get("href").unwrap().as_str().unwrap();
if let Err(e) = webbrowser::open(url) {
log::error!("Open Browser error: {:?}", e);
}
}
}
}
}
_ => {}
}
None