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
Unverified
parent f834f069cd
commit 5a8e0749c2
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())

View File

@@ -64,6 +64,7 @@ fn main() -> std::io::Result<()> {
cmds::get_runtime_exists,
cmds::get_runtime_logs,
cmds::uwp::invoke_uwp_tool,
cmds::copy_clash_env,
// verge
cmds::get_verge_config,
cmds::patch_verge_config,