mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-22 15:40:07 -04:00
Fix drag working in dev & prod
This commit is contained in:
BIN
Cargo.lock
generated
BIN
Cargo.lock
generated
Binary file not shown.
@@ -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');
|
||||
|
||||
2
apps/desktop/src/commands.ts
generated
2
apps/desktop/src/commands.ts
generated
@@ -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