settings page, reveal in explorer

This commit is contained in:
2026-05-11 23:59:29 +03:00
parent 2c041be5a9
commit 03af276a1d
5 changed files with 283 additions and 11 deletions
+11
View File
@@ -229,6 +229,16 @@ pub struct ExportResult {
pub size_bytes: u64,
}
#[tauri::command]
fn reveal_in_explorer(path: String) -> Result<(), String> {
use std::process::Command;
Command::new("explorer.exe")
.arg(format!("/select,{path}"))
.spawn()
.map_err(|e| format!("opening explorer: {e}"))?;
Ok(())
}
#[tauri::command]
fn export(state: State<'_, AppState>, request: ExportRequest) -> Result<ExportResult, String> {
let cfg = state.config.lock().expect("config mutex").clone();
@@ -310,6 +320,7 @@ pub fn run() {
start_capture,
stop_capture,
export,
reveal_in_explorer,
])
.run(tauri::generate_context!())
.expect("error while running ByteSize")