chore: unused clash core (#284)

This commit is contained in:
ycjcl868 2024-01-23 11:22:15 +08:00 committed by GitHub
parent 68ef03377d
commit d4623e4175
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 7 deletions

View File

@ -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",

View File

@ -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

View File

@ -259,7 +259,7 @@ impl CoreManager {
/// 切换核心
pub async fn change_core(&self, clash_core: Option<String>) -> 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}\"");

View File

@ -135,8 +135,12 @@ const SettingVerge = ({ onError }: Props) => {
>
<Select size="small" sx={{ width: 140, "> div": { py: "7.5px" } }}>
<MenuItem value="bash">Bash</MenuItem>
<MenuItem value="cmd">CMD</MenuItem>
<MenuItem value="powershell">PowerShell</MenuItem>
{OS === "windows" && (
<>
<MenuItem value="cmd">CMD</MenuItem>
<MenuItem value="powershell">PowerShell</MenuItem>
</>
)}
</Select>
</GuardState>
</SettingItem>