mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-10-08 02:21:42 -04:00
Fix drag working in dev & prod
This commit is contained in:
1 parent
5ae45c62a6
commit
110f6126e2
4 files changed
+8
-6
No files matched your search
Generated
+3
-3
@@ -3725,7 +3725,7 @@ dependencies = [
|
||||
"presser",
|
||||
"thiserror 1.0.64",
|
||||
"winapi",
|
||||
"windows 0.52.0",
|
||||
"windows 0.51.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4419,7 +4419,7 @@ dependencies = [
|
||||
"iana-time-zone-haiku",
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
"windows-core 0.52.0",
|
||||
"windows-core 0.51.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5471,7 +5471,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-targets 0.52.6",
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -66,7 +66,7 @@ static TRACKING: AtomicBool = AtomicBool::new(false);
|
||||
/// * `window` - The Tauri window instance
|
||||
/// * `_state` - Current drag state (unused)
|
||||
/// * `files` - Vector of file paths to be dragged
|
||||
/// * `icon_path` - Path to the preview icon for the drag operation
|
||||
/// * `image` - Base64 encoded image to be used as drag icon
|
||||
/// * `on_event` - Channel for communicating drag operation events back to the frontend
|
||||
#[tauri::command(async)]
|
||||
#[specta::specta]
|
||||
|
||||
@@ -142,9 +142,11 @@ function useDragAndDrop() {
|
||||
explorerStore.drag = null;
|
||||
};
|
||||
|
||||
const image = !Transparent.includes('/@fs/') ? Transparent : Transparent.replace('/@fs', '');
|
||||
|
||||
await invoke('start_drag', {
|
||||
files: validFiles,
|
||||
image: Transparent,
|
||||
image: image,
|
||||
onEvent: channel
|
||||
});
|
||||
console.log('start_drag invoked successfully');
|
||||
|
||||
Generated
+1
-1
@@ -56,7 +56,7 @@ export const commands = {
|
||||
* * `window` - The Tauri window instance
|
||||
* * `_state` - Current drag state (unused)
|
||||
* * `files` - Vector of file paths to be dragged
|
||||
* * `icon_path` - Path to the preview icon for the drag operation
|
||||
* * `image` - Base64 encoded image to be used as drag icon
|
||||
* * `on_event` - Channel for communicating drag operation events back to the frontend
|
||||
*/
|
||||
async startDrag(
|
||||
|
||||
Reference in new issue
Block a user