Browse Source

feat: add meta feature

GyDi 2 years ago
parent
commit
c51e9e6b2c
2 changed files with 9 additions and 3 deletions
  1. 1 1
      src-tauri/Cargo.toml
  2. 8 2
      src-tauri/src/config/verge.rs

+ 1 - 1
src-tauri/Cargo.toml

@@ -52,7 +52,7 @@ windows-sys = { version = "0.36", features = ["Win32_System_LibraryLoader", "Win
 default = ["custom-protocol"]
 custom-protocol = ["tauri/custom-protocol"]
 verge-dev = []
-debug-yml = []
+default-meta = []
 
 [profile.release]
 panic = "abort"

+ 8 - 2
src-tauri/src/config/verge.rs

@@ -99,8 +99,14 @@ impl IVerge {
 
     pub fn template() -> Self {
         Self {
-            clash_core: Some("clash".into()),
-            language: Some("en".into()),
+            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()),
+            },
             theme_mode: Some("system".into()),
             theme_blur: Some(false),
             traffic_graph: Some(true),