feature: copy clash env (#1391)

* feat: copy clash env

* style: use ContentCopyRounded replace CopyAll
This commit is contained in:
Avan
2024-07-13 01:03:46 +08:00
committed by GitHub
parent b4025c45da
commit 32212a46e2
9 changed files with 40 additions and 4 deletions

View File

@@ -12,6 +12,12 @@ use sysproxy::{Autoproxy, Sysproxy};
use tauri::{api, Manager};
type CmdResult<T = ()> = Result<T, String>;
#[tauri::command]
pub fn copy_clash_env(app_handle: tauri::AppHandle) -> CmdResult {
feat::copy_clash_env(&app_handle);
Ok(())
}
#[tauri::command]
pub fn get_profiles() -> CmdResult<IProfiles> {
Ok(Config::profiles().data().clone())