refactor: Remove unnecessary changes

This commit is contained in:
MystiPanda
2023-12-07 13:43:53 +08:00
parent c8a508f35c
commit 9c94494622
12 changed files with 10 additions and 594 deletions

View File

@@ -59,8 +59,6 @@ features = ["global-shortcut-all", "process-all", "shell-all", "system-tray", "u
[features]
default = ["custom-protocol"]
custom-protocol = ["tauri/custom-protocol"]
verge-dev = []
default-meta = []
[profile.release]
panic = "abort"

View File

@@ -24,29 +24,12 @@ impl IClashTemp {
pub fn template() -> Self {
let mut map = Mapping::new();
map.insert(
"mixed-port".into(),
match cfg!(feature = "default-meta") {
false => 7890.into(),
true => 7898.into(),
},
);
map.insert("mixed-port".into(), 7890.into());
map.insert("log-level".into(), "info".into());
map.insert("allow-lan".into(), false.into());
map.insert("mode".into(), "rule".into());
map.insert(
"external-controller".into(),
match cfg!(feature = "default-meta") {
false => "127.0.0.1:9090".into(),
true => "127.0.0.1:9098".into(),
},
);
map.insert("external-controller".into(), "127.0.0.1:9090".into());
map.insert("secret".into(), "".into());
#[cfg(feature = "default-meta")]
map.insert("unified-delay".into(), true.into());
#[cfg(feature = "default-meta")]
map.insert("tcp-concurrent".into(), true.into());
// map.insert("ipv6".into(), false.into());
Self(map)
}

View File

@@ -55,12 +55,7 @@ impl IProfiles {
pub fn template() -> Self {
Self {
valid: Some(vec![
"dns".into(),
"sub-rules".into(),
"unified-delay".into(),
"tcp-concurrent".into(),
]),
valid: Some(vec!["dns".into()]),
items: Some(vec![]),
..Self::default()
}

View File

@@ -130,14 +130,8 @@ impl IVerge {
pub fn template() -> Self {
Self {
clash_core: match cfg!(feature = "default-meta") {
false => Some("clash".into()),
true => Some("clash-meta".into()),
},
language: match cfg!(feature = "default-meta") {
false => Some("en".into()),
true => Some("zh".into()),
},
clash_core: Some("clash-meta".into()),
language: Some("zh".into()),
theme_mode: Some("system".into()),
theme_blur: Some(false),
traffic_graph: Some(true),