defaults to project folders; examining zones
This commit is contained in:
@ -9,6 +9,14 @@ mod ai_provider;
|
||||
mod caption_generator;
|
||||
mod background_removal;
|
||||
|
||||
#[tauri::command]
|
||||
fn get_projects_directory() -> Result<String, String> {
|
||||
let dir = paths::project_root().join("Projects");
|
||||
std::fs::create_dir_all(&dir)
|
||||
.map_err(|e| format!("Failed to create Projects directory: {e}"))?;
|
||||
Ok(dir.to_string_lossy().to_string())
|
||||
}
|
||||
|
||||
/// Returns the backend URL.
|
||||
#[tauri::command]
|
||||
fn get_backend_url() -> String {
|
||||
@ -234,6 +242,7 @@ pub fn run() {
|
||||
Ok(())
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
get_projects_directory,
|
||||
get_backend_url,
|
||||
encrypt_string,
|
||||
decrypt_string,
|
||||
|
||||
Reference in New Issue
Block a user