From d4623e41752cca173b78c6dd33ed09207c908841 Mon Sep 17 00:00:00 2001 From: ycjcl868 Date: Tue, 23 Jan 2024 11:22:15 +0800 Subject: [PATCH] chore: unused clash core (#284) --- package.json | 1 - pnpm-lock.yaml | 3 --- src-tauri/src/core/core.rs | 2 +- src/components/setting/setting-verge.tsx | 8 ++++++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 9f48a84..b73b67d 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,6 @@ "@tauri-apps/cli": "^1.5.9", "@types/fs-extra": "^9.0.13", "@types/js-cookie": "^3.0.6", - "@types/lodash": "^4.14.202", "@types/lodash-es": "^4.17.12", "@types/react": "^18.2.48", "@types/react-dom": "^18.2.18", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5bc0cfe..9ec5193 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -109,9 +109,6 @@ devDependencies: "@types/js-cookie": specifier: ^3.0.6 version: 3.0.6 - "@types/lodash": - specifier: ^4.14.202 - version: 4.14.202 "@types/lodash-es": specifier: ^4.17.12 version: 4.17.12 diff --git a/src-tauri/src/core/core.rs b/src-tauri/src/core/core.rs index 61dddcf..5de89b6 100644 --- a/src-tauri/src/core/core.rs +++ b/src-tauri/src/core/core.rs @@ -259,7 +259,7 @@ impl CoreManager { /// 切换核心 pub async fn change_core(&self, clash_core: Option) -> Result<()> { let clash_core = clash_core.ok_or(anyhow::anyhow!("clash core is null"))?; - const CLASH_CORES: [&str; 3] = ["clash", "clash-meta", "clash-meta-alpha"]; + const CLASH_CORES: [&str; 2] = ["clash-meta", "clash-meta-alpha"]; if !CLASH_CORES.contains(&clash_core.as_str()) { bail!("invalid clash core name \"{clash_core}\""); diff --git a/src/components/setting/setting-verge.tsx b/src/components/setting/setting-verge.tsx index b46a91a..50650c8 100644 --- a/src/components/setting/setting-verge.tsx +++ b/src/components/setting/setting-verge.tsx @@ -135,8 +135,12 @@ const SettingVerge = ({ onError }: Props) => { >