feat: compatible with macos(wip)

This commit is contained in:
GyDi
2021-12-29 18:49:38 +08:00
parent 63b01376d6
commit 1d87f78088
4 changed files with 22 additions and 22 deletions

View File

@@ -11,14 +11,13 @@ pub fn resolve_setup(app: &App) {
init::init_app(app.package_info());
// run clash sidecar
let info = clash::run_clash_bin(&app.handle());
// update the profile
let info_ = info.clone();
tauri::async_runtime::spawn(async move {
if let Err(err) = clash::put_clash_profile(&info_).await {
log::error!("failed to put config for `{}`", err);
};
let info = clash::run_clash_bin(&app.handle(), |info_| {
// update the profile
tauri::async_runtime::spawn(async move {
if let Err(err) = clash::put_clash_profile(&info_).await {
log::error!("failed to put config for `{}`", err);
};
});
});
// resolve the verge config - enable system proxy