style: resolve formatting problem
This commit is contained in:
parent
fbb17a0ba5
commit
c278f1af00
@ -274,18 +274,24 @@ impl Core {
|
|||||||
let system_proxy = verge.enable_system_proxy.as_ref();
|
let system_proxy = verge.enable_system_proxy.as_ref();
|
||||||
let tun_mode = verge.enable_tun_mode.as_ref();
|
let tun_mode = verge.enable_tun_mode.as_ref();
|
||||||
|
|
||||||
tray.get_item("rule_mode")
|
tray
|
||||||
|
.get_item("rule_mode")
|
||||||
.set_selected((*mode.unwrap()).eq("rule"))?;
|
.set_selected((*mode.unwrap()).eq("rule"))?;
|
||||||
tray.get_item("global_mode")
|
tray
|
||||||
|
.get_item("global_mode")
|
||||||
.set_selected((*mode.unwrap()).eq("global"))?;
|
.set_selected((*mode.unwrap()).eq("global"))?;
|
||||||
tray.get_item("direct_mode")
|
tray
|
||||||
|
.get_item("direct_mode")
|
||||||
.set_selected((*mode.unwrap()).eq("direct"))?;
|
.set_selected((*mode.unwrap()).eq("direct"))?;
|
||||||
tray.get_item("script_mode")
|
tray
|
||||||
|
.get_item("script_mode")
|
||||||
.set_selected((*mode.unwrap()).eq("script"))?;
|
.set_selected((*mode.unwrap()).eq("script"))?;
|
||||||
|
|
||||||
tray.get_item("system_proxy")
|
tray
|
||||||
|
.get_item("system_proxy")
|
||||||
.set_selected(*system_proxy.unwrap_or(&false))?;
|
.set_selected(*system_proxy.unwrap_or(&false))?;
|
||||||
tray.get_item("tun_mode")
|
tray
|
||||||
|
.get_item("tun_mode")
|
||||||
.set_selected(*tun_mode.unwrap_or(&false))?;
|
.set_selected(*tun_mode.unwrap_or(&false))?;
|
||||||
|
|
||||||
// update verge config
|
// update verge config
|
||||||
|
@ -171,10 +171,7 @@ impl Service {
|
|||||||
match builder.send().await {
|
match builder.send().await {
|
||||||
Ok(resp) => {
|
Ok(resp) => {
|
||||||
if resp.status() != 204 {
|
if resp.status() != 204 {
|
||||||
log::error!(
|
log::error!("failed to activate clash with status \"{}\"", resp.status());
|
||||||
"failed to activate clash with status \"{}\"",
|
|
||||||
resp.status()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
notice.refresh_clash();
|
notice.refresh_clash();
|
||||||
@ -229,10 +226,7 @@ impl Service {
|
|||||||
match builder.send().await {
|
match builder.send().await {
|
||||||
Ok(resp) => {
|
Ok(resp) => {
|
||||||
if resp.status() != 204 {
|
if resp.status() != 204 {
|
||||||
log::error!(
|
log::error!("failed to activate clash with status \"{}\"", resp.status());
|
||||||
"failed to activate clash with status \"{}\"",
|
|
||||||
resp.status()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
notice.refresh_clash();
|
notice.refresh_clash();
|
||||||
|
Loading…
Reference in New Issue
Block a user