mirror of
https://github.com/octopusYan/dayz-mod-translator.git
synced 2025-12-13 11:41:57 +08:00
feat: 添加about页面
This commit is contained in:
@ -215,8 +215,11 @@ public class MainController extends BaseController<MainViewModel> {
|
||||
ViewUtil.openDecorated("翻译设置", "setup/translate-view");
|
||||
}
|
||||
|
||||
public void setFileName(String name) {
|
||||
fileNameLabel.setText("PBO文件:" + name);
|
||||
/**
|
||||
* 关于
|
||||
*/
|
||||
public void openAbout() {
|
||||
ViewUtil.openDecorated("关于", "about-view");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
package cn.octopusyan.dmt.controller.help;
|
||||
|
||||
import cn.octopusyan.dmt.common.base.BaseController;
|
||||
import cn.octopusyan.dmt.common.config.Constants;
|
||||
import cn.octopusyan.dmt.common.config.Context;
|
||||
import cn.octopusyan.dmt.viewModel.AboutViewModel;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.scene.layout.VBox;
|
||||
|
||||
/**
|
||||
* 关于
|
||||
*
|
||||
* @author octopus_yan
|
||||
*/
|
||||
public class AboutController extends BaseController<AboutViewModel> {
|
||||
public VBox root;
|
||||
public Label title;
|
||||
public Label infoTitle;
|
||||
public Label version;
|
||||
|
||||
@Override
|
||||
public Pane getRootPanel() {
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
title.setText(Constants.APP_TITLE);
|
||||
infoTitle.setText(Constants.APP_TITLE);
|
||||
version.setText(STR."版本:\{Constants.APP_VERSION}(x64)");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initViewAction() {
|
||||
|
||||
}
|
||||
|
||||
public void openGitee() {
|
||||
Context.openUrl("https://gitee.com/octopus_yan/dayz-mod-translator");
|
||||
}
|
||||
|
||||
public void openGithub() {
|
||||
Context.openUrl("https://github.com/octopusYan/dayz-mod-translator");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package cn.octopusyan.dmt.viewModel;
|
||||
|
||||
import cn.octopusyan.dmt.common.base.BaseViewModel;
|
||||
import cn.octopusyan.dmt.controller.help.AboutController;
|
||||
|
||||
/**
|
||||
* 关于
|
||||
*
|
||||
* @author octopus_yan
|
||||
*/
|
||||
public class AboutViewModel extends BaseViewModel<AboutController> {
|
||||
}
|
||||
Reference in New Issue
Block a user