Added patch to WRY for ipc connector
This commit is contained in:
@@ -19,7 +19,7 @@ pub fn run() {
|
||||
.title("WVU Medicine Help Alert")
|
||||
.inner_size(1200.0, 1000.0)
|
||||
.initialization_script(INJECT_JS)
|
||||
.on_navigation(move |nav_url| {
|
||||
.on_navigation(move |nav_url: &tauri::Url| {
|
||||
if nav_url.path().contains("helpalert.html") {
|
||||
if let Some(w) = w_handle.get_webview_window("main") {
|
||||
let _ = w.eval(
|
||||
@@ -37,7 +37,7 @@ pub fn run() {
|
||||
.tooltip("WVUMedicine Help Alert Web Client")
|
||||
.menu(&menu)
|
||||
.icon(app.default_window_icon().unwrap().clone())
|
||||
.on_menu_event(|app, event| match event.id.as_ref() {
|
||||
.on_menu_event(|app: &tauri::AppHandle, event: tauri::menu::MenuEvent| match event.id.as_ref() {
|
||||
"show" => {
|
||||
if let Some(w) = app.get_webview_window("main") {
|
||||
let _ = w.show();
|
||||
@@ -49,7 +49,7 @@ pub fn run() {
|
||||
}
|
||||
_ => {}
|
||||
})
|
||||
.on_tray_icon_event(|tray, event| {
|
||||
.on_tray_icon_event(|tray: &tauri::tray::TrayIcon, event: TrayIconEvent| {
|
||||
if let TrayIconEvent::Click {
|
||||
button: MouseButton::Left,
|
||||
button_state: MouseButtonState::Down,
|
||||
@@ -66,7 +66,7 @@ pub fn run() {
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.on_window_event(|window, event| {
|
||||
.on_window_event(|window: &tauri::Window, event: &WindowEvent| {
|
||||
if let WindowEvent::CloseRequested { api, .. } = event {
|
||||
api.prevent_close();
|
||||
let _ = window.hide();
|
||||
|
||||
Reference in New Issue
Block a user