Fix Windows build: add urlencoding, fix inner_size float args, fix notification, fix hotkey id

This commit is contained in:
Aether 2026-02-23 19:38:17 +00:00
parent 90349bfa20
commit d5599f1eb6
No known key found for this signature in database
GPG Key ID: 95AFEE837E39AFD2
4 changed files with 13 additions and 10 deletions

View File

@ -26,6 +26,7 @@ dashmap = "5.5"
# HTTP Client # HTTP Client
reqwest = { version = "0.11", features = ["json", "rustls-tls"] } reqwest = { version = "0.11", features = ["json", "rustls-tls"] }
urlencoding = "2.1"
# Window management # Window management
window-vibrancy = "0.4" window-vibrancy = "0.4"

View File

@ -72,7 +72,7 @@ pub fn show_settings_window(app: AppHandle) {
tauri::WindowUrl::App("/#/settings".into()) tauri::WindowUrl::App("/#/settings".into())
) )
.title("Settings") .title("Settings")
.inner_size(900, 700) .inner_size(900.0, 700.0)
.center() .center()
.build() .build()
.unwrap(); .unwrap();
@ -91,7 +91,7 @@ pub fn show_plugins_window(app: AppHandle) {
tauri::WindowUrl::App("/#/plugins".into()) tauri::WindowUrl::App("/#/plugins".into())
) )
.title("Plugins") .title("Plugins")
.inner_size(1000, 800) .inner_size(1000.0, 800.0)
.center() .center()
.build() .build()
.unwrap(); .unwrap();
@ -188,14 +188,15 @@ pub fn set_hotkey(
pub fn show_notification( pub fn show_notification(
title: String, title: String,
body: String, body: String,
app: AppHandle _app: AppHandle
) -> Result<(), String> { ) -> Result<(), String> {
app.notification() use notify_rust::Notification;
.builder() Notification::new()
.title(title) .summary(&title)
.body(body) .body(&body)
.show() .show()
.map_err(|e| e.to_string()) .map_err(|e| e.to_string())?;
Ok(())
} }
// Log reader // Log reader

View File

@ -65,7 +65,8 @@ impl HotkeyManager {
let hotkey = parse_shortcut(shortcut)?; let hotkey = parse_shortcut(shortcut)?;
// Register with global hotkey manager // 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 // Store in our map
let mut hotkeys = self.hotkeys.lock().unwrap(); let mut hotkeys = self.hotkeys.lock().unwrap();

View File

@ -25,7 +25,7 @@ pub fn create_overlay_window(app: &AppHandle) {
WindowUrl::App("/#/overlay".into()) WindowUrl::App("/#/overlay".into())
) )
.title("EU-Utility Overlay") .title("EU-Utility Overlay")
.inner_size(400, 600) .inner_size(400.0, 600.0)
.position(100.0, 100.0) .position(100.0, 100.0)
.transparent(true) .transparent(true)
.decorations(false) .decorations(false)