pref: 开始下载后跳转主界面查看下载进度

This commit is contained in:
octopus_yan 2024-09-21 19:37:51 +08:00
parent 6294fdbf42
commit 229662bd15
2 changed files with 9 additions and 0 deletions

View File

@ -143,6 +143,11 @@ public class RootController extends BaseController<RootViewModel> {
Context.openUrl("https://github.com/alist-org/alist"); Context.openUrl("https://github.com/alist-org/alist");
} }
public void showTab(int index) {
if (index < 0 || index > 2) return;
tabPane.getSelectionModel().select(index);
}
public void showModal(Node node, boolean persistent) { public void showModal(Node node, boolean persistent) {
modalPane.show(node); modalPane.show(node);
modalPane.setPersistent(persistent); modalPane.setPersistent(persistent);

View File

@ -5,6 +5,8 @@ import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ZipUtil; import cn.hutool.core.util.ZipUtil;
import cn.octopusyan.alistgui.config.Constants; import cn.octopusyan.alistgui.config.Constants;
import cn.octopusyan.alistgui.config.Context;
import cn.octopusyan.alistgui.controller.RootController;
import cn.octopusyan.alistgui.manager.ConsoleLog; import cn.octopusyan.alistgui.manager.ConsoleLog;
import cn.octopusyan.alistgui.model.upgrade.AList; import cn.octopusyan.alistgui.model.upgrade.AList;
import cn.octopusyan.alistgui.model.upgrade.Gui; import cn.octopusyan.alistgui.model.upgrade.Gui;
@ -43,6 +45,8 @@ public class DownloadUtil {
@Override @Override
public void onRunning() { public void onRunning() {
// 不展示进度条 // 不展示进度条
RootController root = (RootController) Context.getControllers().get(RootController.class.getSimpleName());
root.showTab(0);
} }
@Override @Override