From d5599f1eb6a18a4ff657492b6b72ce9970ee2234 Mon Sep 17 00:00:00 2001 From: Aether Date: Mon, 23 Feb 2026 19:38:17 +0000 Subject: [PATCH] Fix Windows build: add urlencoding, fix inner_size float args, fix notification, fix hotkey id --- src-tauri/Cargo.toml | 1 + src-tauri/src/api.rs | 17 +++++++++-------- src-tauri/src/hotkeys.rs | 3 ++- src-tauri/src/window.rs | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 301069f..e79c28e 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -26,6 +26,7 @@ dashmap = "5.5" # HTTP Client reqwest = { version = "0.11", features = ["json", "rustls-tls"] } +urlencoding = "2.1" # Window management window-vibrancy = "0.4" diff --git a/src-tauri/src/api.rs b/src-tauri/src/api.rs index 76d1fdc..1bdd970 100644 --- a/src-tauri/src/api.rs +++ b/src-tauri/src/api.rs @@ -72,7 +72,7 @@ pub fn show_settings_window(app: AppHandle) { tauri::WindowUrl::App("/#/settings".into()) ) .title("Settings") - .inner_size(900, 700) + .inner_size(900.0, 700.0) .center() .build() .unwrap(); @@ -91,7 +91,7 @@ pub fn show_plugins_window(app: AppHandle) { tauri::WindowUrl::App("/#/plugins".into()) ) .title("Plugins") - .inner_size(1000, 800) + .inner_size(1000.0, 800.0) .center() .build() .unwrap(); @@ -188,14 +188,15 @@ pub fn set_hotkey( pub fn show_notification( title: String, body: String, - app: AppHandle + _app: AppHandle ) -> Result<(), String> { - app.notification() - .builder() - .title(title) - .body(body) + use notify_rust::Notification; + Notification::new() + .summary(&title) + .body(&body) .show() - .map_err(|e| e.to_string()) + .map_err(|e| e.to_string())?; + Ok(()) } // Log reader diff --git a/src-tauri/src/hotkeys.rs b/src-tauri/src/hotkeys.rs index f1b9309..9d6fa14 100644 --- a/src-tauri/src/hotkeys.rs +++ b/src-tauri/src/hotkeys.rs @@ -65,7 +65,8 @@ impl HotkeyManager { let hotkey = parse_shortcut(shortcut)?; // Register with global hotkey manager - let id = self.manager.register(hotkey).map_err(|e| e.to_string())?; + let hotkey_id = self.manager.register(hotkey).map_err(|e| e.to_string())?; + let id = hotkey_id.id(); // Get the u32 id // Store in our map let mut hotkeys = self.hotkeys.lock().unwrap(); diff --git a/src-tauri/src/window.rs b/src-tauri/src/window.rs index 5f98f4a..176952f 100644 --- a/src-tauri/src/window.rs +++ b/src-tauri/src/window.rs @@ -25,7 +25,7 @@ pub fn create_overlay_window(app: &AppHandle) { WindowUrl::App("/#/overlay".into()) ) .title("EU-Utility Overlay") - .inner_size(400, 600) + .inner_size(400.0, 600.0) .position(100.0, 100.0) .transparent(true) .decorations(false)