当 CurseForge API Key 缺失时隐藏下载源切换选项 (#5802)

This commit is contained in:
Glavo authored and GitHub committed 2026-03-21 21:31:11 +08:00
1 parent 80d2fefa1f
commit c181c7825b
1 file changed
+6 -1
@@ -61,7 +61,12 @@ public final class HMCLLocalizedDownloadListPage extends DownloadListPage {
repository = new Repository(type, curseForge, modrinth);
supportChinese.set(true);
downloadSources.get().setAll("mods.modrinth", "mods.curseforge");
downloadSources.setAll("mods.modrinth");
if (CurseForgeRemoteModRepository.isAvailable()) {
downloadSources.add("mods.curseforge");
}
if (modrinth != null) {
downloadSource.set("mods.modrinth");
} else if (curseForge != null) {