From c51e9e6b2cf6d9c3edb6931e3bba8e699c4c5080 Mon Sep 17 00:00:00 2001 From: GyDi <zzzgydi@gmail.com> Date: Thu, 24 Nov 2022 10:26:41 +0800 Subject: [PATCH] feat: add meta feature --- src-tauri/Cargo.toml | 2 +- src-tauri/src/config/verge.rs | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index ea4e340..fb66efa 100644 --- a/src-tauri/Cargo.toml +++ b/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" diff --git a/src-tauri/src/config/verge.rs b/src-tauri/src/config/verge.rs index 43f175b..1cb058e 100644 --- a/src-tauri/src/config/verge.rs +++ b/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), -- GitLab