From 584a8429d1c37fe20cd9a2f13c87916df54ddc1b Mon Sep 17 00:00:00 2001 From: Jumoke Bolanle Date: Thu, 7 May 2026 22:57:15 -0500 Subject: [PATCH] fix: correct About version and fix drag-and-drop file paths - Use env!("CARGO_PKG_VERSION") in AboutMetadata so the version stays in sync with Cargo.toml automatically - Replace HTML5 drop handler with tauri://drag-drop event listener; Tauri v2 webview does not expose file.path on File objects so the old handler always fell back to the bare filename instead of the absolute path --- src-tauri/src/menu.rs | 2 +- src/lib/components/Sidebar.svelte | 23 +++++++++++------------ src/test/Sidebar.test.ts | 16 +++++++++++++++- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src-tauri/src/menu.rs b/src-tauri/src/menu.rs index 245c406..e466a3e 100644 --- a/src-tauri/src/menu.rs +++ b/src-tauri/src/menu.rs @@ -22,7 +22,7 @@ pub fn build_menu(app: &tauri::AppHandle) -> tauri::Result<(Menu, Me Some(AboutMetadata { icon: Some(include_image!("icons/icon.png")), name: Some("compress[pdf]".to_string()), - version: Some("1.1.0".to_string()), + version: Some(env!("CARGO_PKG_VERSION").to_string()), copyright: Some("Copyright \u{00A9} 2026 Olajumoke Bolanle".to_string()), license: Some("GNU Affero General Public License v3.0".to_string()), website: Some("https://github.com/JBolanle/PDFCompressor/".to_string()), diff --git a/src/lib/components/Sidebar.svelte b/src/lib/components/Sidebar.svelte index 784873e..2cc7c7a 100644 --- a/src/lib/components/Sidebar.svelte +++ b/src/lib/components/Sidebar.svelte @@ -1,21 +1,21 @@