mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-14 08:41:21 +10:00
@ -5,6 +5,7 @@ use download_manager::DOWNLOAD_MANAGER;
|
||||
use log::{debug, error};
|
||||
use tauri::AppHandle;
|
||||
use tauri_plugin_autostart::ManagerExt;
|
||||
use tauri_plugin_opener::OpenerExt;
|
||||
|
||||
use crate::AppState;
|
||||
|
||||
@ -72,3 +73,10 @@ pub fn get_autostart_enabled(app: AppHandle) -> Result<bool, tauri_plugin_autost
|
||||
|
||||
Ok(db_state)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn open_fs(path: String, app_handle: AppHandle) -> Result<(), tauri_plugin_opener::Error> {
|
||||
app_handle
|
||||
.opener()
|
||||
.open_path(path, None::<&str>)
|
||||
}
|
||||
|
||||
@ -229,6 +229,7 @@ pub fn run() {
|
||||
fetch_state,
|
||||
quit,
|
||||
fetch_system_data,
|
||||
open_fs,
|
||||
// User utils
|
||||
update_settings,
|
||||
fetch_settings,
|
||||
|
||||
Reference in New Issue
Block a user