mirror of
https://github.com/octopusYan/alist-gui.git
synced 2024-11-23 12:36:43 +08:00
pref: 开始下载后跳转主界面查看下载进度
This commit is contained in:
parent
6294fdbf42
commit
229662bd15
@ -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);
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user