From 542cab4249abf6a0f348952cfd0bc026109681ed Mon Sep 17 00:00:00 2001 From: spinline Date: Sun, 1 Feb 2026 15:44:17 +0300 Subject: [PATCH] fix: Resolve build errors for mobile long-press (missing deps, type mismatch) --- frontend/Cargo.toml | 6 +++++- frontend/src/components/torrent/table.rs | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml index 5647744..63b3726 100644 --- a/frontend/Cargo.toml +++ b/frontend/Cargo.toml @@ -32,7 +32,11 @@ web-sys = { version = "0.3", features = [ "Element", "DomTokenList", "CssStyleDeclaration", - "Storage" + "Storage", + "TouchEvent", + "TouchList", + "Touch", + "Navigator" ] } shared = { path = "../shared" } tailwind_fuse = "0.3.2" diff --git a/frontend/src/components/torrent/table.rs b/frontend/src/components/torrent/table.rs index f2f87e4..898dce0 100644 --- a/frontend/src/components/torrent/table.rs +++ b/frontend/src/components/torrent/table.rs @@ -1,4 +1,6 @@ use leptos::*; +use wasm_bindgen::closure::Closure; +use wasm_bindgen::JsCast; @@ -297,9 +299,8 @@ pub fn TorrentTable() -> impl IntoView { set_menu_visible.set(true); // Haptic feedback if available - if let Ok(navigator) = window().navigator() { - let _ = navigator.vibrate_with_duration(50); - } + let navigator = window().navigator(); + let _ = navigator.vibrate_with_duration(50); }) as Box); let id = window()