mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-11-23 13:50:20 +00:00
Added another handler for window file drop events
This commit is contained in:
parent
ce302e7b98
commit
0441c9c78b
@ -28,6 +28,15 @@ pub fn start_tauri() {
|
||||
let app = tauri::Builder::default()
|
||||
.setup(move |app| {
|
||||
let window = app.get_window("main").expect("Failed to get main window.");
|
||||
|
||||
// Register a callback for file drop events:
|
||||
window.on_window_event(|event|
|
||||
if let tauri::WindowEvent::FileDrop(files) = event {
|
||||
info!(Source = "Tauri"; "files were dropped: {files:?}");
|
||||
}
|
||||
);
|
||||
|
||||
// Save the main window for later access:
|
||||
*MAIN_WINDOW.lock().unwrap() = Some(window);
|
||||
|
||||
info!(Source = "Bootloader Tauri"; "Setup is running.");
|
||||
|
||||
@ -40,7 +40,8 @@
|
||||
"resizable": true,
|
||||
"title": "MindWork AI Studio",
|
||||
"width": 1920,
|
||||
"height": 1080
|
||||
"height": 1080,
|
||||
"fileDropEnabled": true
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user