feat: bringing back shortcuts

This commit is contained in:
2025-04-22 15:28:21 +01:00
parent 0940134d9e
commit 301944b769

View File

@ -3,6 +3,9 @@ mod state;
mod utils; mod utils;
mod window; mod window;
#[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))]
mod shortcut;
use state::new_shared_watcher_state; use state::new_shared_watcher_state;
use window::setup_window; use window::setup_window;
@ -17,9 +20,15 @@ pub fn desktop() {
.plugin(tauri_plugin_dialog::init()) .plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_opener::init()) .plugin(tauri_plugin_opener::init())
.manage(watcher_state) .manage(watcher_state)
.invoke_handler(tauri::generate_handler![commands::handle_selected_folder,]) .invoke_handler(tauri::generate_handler![
commands::handle_selected_folder,
shortcut::change_shortcut,
shortcut::unregister_shortcut,
shortcut::get_current_shortcut,
])
.setup(|app| { .setup(|app| {
setup_window(app)?; setup_window(app)?;
shortcut::enable_shortcut(app);
Ok(()) Ok(())
}) })