From 1c91f0aeeb7de40e018b99e7b3c6f319d66baafb Mon Sep 17 00:00:00 2001 From: Internet1235 <135099493+Internet1235@users.noreply.github.com> Date: Mon, 11 Aug 2025 18:17:46 +0800 Subject: [PATCH] official: rename cdn(jsdcdn) --- src-tauri/src/community/provider/official.rs | 8 ++++---- src-tauri/src/pluginstore/provider/official.rs | 8 ++++---- src/pages/settings/index.tsx | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src-tauri/src/community/provider/official.rs b/src-tauri/src/community/provider/official.rs index c9961ba..f56fbd5 100644 --- a/src-tauri/src/community/provider/official.rs +++ b/src-tauri/src/community/provider/official.rs @@ -27,7 +27,7 @@ enum Cdn { Raw, JsDelivr, GhFast, - JsdCdn, + AstroBox_Cdn, } impl Cdn { @@ -47,10 +47,10 @@ impl Cdn { "https://ghfast.top/{}", url.strip_prefix("https://").unwrap_or(url) ), - Cdn::JsdCdn => url + Cdn::AstroBox_Cdn => url .replace( "https://raw.githubusercontent.com/", - "https://cdn.615873.xyz/gh/", + "https://cdn.astrobox.top/gh/", ) .replace("/refs/heads/main/", "@main/"), } @@ -71,7 +71,7 @@ impl OfficialProvider { let cdn = match cdn.unwrap_or("raw") { "jsdelivr" => Cdn::JsDelivr, "ghfast" => Cdn::GhFast, - "jsdcdn" => Cdn::JsdCdn, + "astrobox-cdn" => Cdn::AstroBox_Cdn, _ => Cdn::Raw, }; let provider = Self { diff --git a/src-tauri/src/pluginstore/provider/official.rs b/src-tauri/src/pluginstore/provider/official.rs index c48b224..393aa14 100644 --- a/src-tauri/src/pluginstore/provider/official.rs +++ b/src-tauri/src/pluginstore/provider/official.rs @@ -17,7 +17,7 @@ enum Cdn { Raw, JsDelivr, GhFast, - JsdCdn, + AstroBox_Cdn, } impl Cdn { @@ -37,10 +37,10 @@ impl Cdn { "https://ghfast.top/{}", url.strip_prefix("https://").unwrap_or(url) ), - Cdn::JsdCdn => url + Cdn::AstroBox_Cdn => url .replace( "https://raw.githubusercontent.com/", - "https://cdn.615873.xyz/gh/", + "https://cdn.astrobox.top/gh/", ) .replace("/refs/heads/main/", "@main/"), } @@ -62,7 +62,7 @@ impl OfficialPluginStore { let cdn = match cdn.unwrap_or("raw") { "jsdelivr" => Cdn::JsDelivr, "ghfast" => Cdn::GhFast, - "jsdcdn" => Cdn::JsdCdn, + "astrobox-cdn" => Cdn::AstroBox_Cdn, _ => Cdn::Raw, }; Self { diff --git a/src/pages/settings/index.tsx b/src/pages/settings/index.tsx index 4857267..c6a4719 100644 --- a/src/pages/settings/index.tsx +++ b/src/pages/settings/index.tsx @@ -259,7 +259,7 @@ function InstallSettings() { function SourceSettings() { const { t } = useI18n(); - const cdnList = ["raw", "jsdelivr", "ghfast", "jsdcdn"]; + const cdnList = ["raw", "jsdelivr", "ghfast", "astrobox-cdn"]; const officialCdnOnSelect = (selected: number) => { const cdn = cdnList[selected] ?? "jsdelivr"; invoke("app_write_config", {