[Fix 2378] Invalid Modrinth Mod ID 错误的 Modrinth Mod ID (#2385)

* Upgrade timeout to 30s

* Fix #2378

* Revert "Upgrade timeout to 30s"

This reverts commit 366a9dd34b7d2706d3a6ec42398c0c9ba43af4f8.
This commit is contained in:
Burning_TNT
2023-07-20 14:30:22 +08:00
committed by GitHub
parent 83120afb63
commit 61165dd71d
7 changed files with 43 additions and 2 deletions

View File

@@ -26,6 +26,8 @@ import javafx.scene.input.Clipboard;
import javafx.scene.input.DataFormat;
import javafx.stage.Stage;
import org.jackhuang.hmcl.auth.offline.Skin;
import org.jackhuang.hmcl.mod.RemoteMod;
import org.jackhuang.hmcl.mod.RemoteModRepository;
import org.jackhuang.hmcl.setting.ConfigHolder;
import org.jackhuang.hmcl.setting.SambaException;
import org.jackhuang.hmcl.task.AsyncTaskExecutor;
@@ -51,8 +53,10 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.stream.Stream;
import static org.jackhuang.hmcl.ui.FXUtils.runInFX;
import static org.jackhuang.hmcl.util.Logging.LOG;
@@ -92,6 +96,18 @@ public final class Launcher extends Application {
}
});
RemoteMod.registerEmptyRemoteMod(new RemoteMod("", "", i18n("mods.broken_dependency.title"), i18n("mods.broken_dependency.desc"), new ArrayList<>(), "", "/assets/img/icon.png", new RemoteMod.IMod() {
@Override
public List<RemoteMod> loadDependencies(RemoteModRepository modRepository) throws IOException {
throw new IOException();
}
@Override
public Stream<RemoteMod.Version> loadVersions(RemoteModRepository modRepository) throws IOException {
throw new IOException();
}
}));
LOG.info("JavaFX Version: " + System.getProperty("javafx.runtime.version"));
try {
Object pipeline = Class.forName("com.sun.prism.GraphicsPipeline").getMethod("getPipeline").invoke(null);

View File

@@ -127,7 +127,7 @@ public class DownloadPage extends DecoratorAnimatedPage implements DecoratorPage
item.setTitle(i18n("resourcepack"));
item.setLeftGraphic(wrap(SVG::textureBox));
item.activeProperty().bind(tab.getSelectionModel().selectedItemProperty().isEqualTo(resourcePackTab));
item.setOnAction(e -> selectTabIfCurseForgeAvailable(resourcePackTab));
item.setOnAction(e -> tab.select(resourcePackTab));
})
// .addNavigationDrawerItem(item -> {
// item.setTitle(i18n("download.curseforge.customization"));

View File

@@ -855,6 +855,8 @@ mods=Mods
mods.add=Add Mods
mods.add.failed=Failed to install mod %s.
mods.add.success=%s was installed successfully.
mods.broken_dependency.title=Broken dependency
mods.broken_dependency.desc=This dependency existed before. However, it doesn't exist now. Try using another download source.
mods.category=Category
mods.check_updates=Check for Updates
mods.check_updates.current_version=Current Version

View File

@@ -728,6 +728,8 @@ mods=模組
mods.add=新增模組
mods.add.failed=新增模組 %s 失敗。
mods.add.success=成功新增模組 %s。
mods.broken_dependency.title=損壞前置模組
mods.broken_dependency.desc=該前置模組曾經在該模組倉庫上存在過,但現在被刪除了。換個下載源試試吧。
mods.category=類別
mods.check_updates=檢查模組更新
mods.check_updates.current_version=當前版本

View File

@@ -728,6 +728,8 @@ mods=模组
mods.add=添加模组
mods.add.failed=添加模组 %s 失败。
mods.add.success=成功添加模组 %s。
mods.broken_dependency.title=损坏前置模组
mods.broken_dependency.desc=该前置模组曾经在该模组仓库上存在过,但现在被删除了。换个下载源试试吧。
mods.category=类别
mods.check_updates=检查模组更新
mods.check_updates.current_version=当前版本