Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src-tauri/src/community/provider/official.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ enum Cdn {
Raw,
JsDelivr,
GhFast,
JsdCdn,
AstroBox_Cdn,
}

impl Cdn {
Expand All @@ -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/"),
}
Expand All @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions src-tauri/src/pluginstore/provider/official.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ enum Cdn {
Raw,
JsDelivr,
GhFast,
JsdCdn,
AstroBox_Cdn,
}

impl Cdn {
Expand All @@ -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/"),
}
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down