Skip to content

Commit 237fe96

Browse files
committed
newui: 启动时添加反馈页面 tab
1 parent 369620b commit 237fe96

2 files changed

Lines changed: 19 additions & 5 deletions

File tree

src/main/java/com/xwintop/xJavaFxTool/newui/NewLauncherController.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.xwintop.xJavaFxTool.newui;
22

33
import com.xwintop.xJavaFxTool.Main;
4+
import com.xwintop.xJavaFxTool.controller.IndexController;
45
import com.xwintop.xJavaFxTool.controller.index.PluginManageController;
56
import com.xwintop.xJavaFxTool.model.PluginJarInfo;
67
import com.xwintop.xJavaFxTool.plugin.PluginManager;
@@ -15,13 +16,16 @@
1516
import javafx.fxml.FXMLLoader;
1617
import javafx.scene.Parent;
1718
import javafx.scene.layout.VBox;
19+
import javafx.scene.web.WebView;
1820
import lombok.extern.slf4j.Slf4j;
1921

2022
@Slf4j
2123
public class NewLauncherController {
2224

2325
public VBox pluginCategories;
2426

27+
public WebView startWebView;
28+
2529
public void openConfigDialog() {
2630
SystemSettingService.openSystemSettings("设置");
2731
}
@@ -46,10 +50,7 @@ public void initialize() {
4650
for (PluginJarInfo jarInfo : pluginList) {
4751
String menuParentTitle = jarInfo.getMenuParentTitle();
4852
if (menuParentTitle != null) {
49-
5053
String categoryName = menuResourceBundle.getString(menuParentTitle);
51-
String pluginName = jarInfo.getName();
52-
5354
PluginCategoryController category = categoryControllers.computeIfAbsent(
5455
categoryName, __ -> {
5556
PluginCategoryController _category =
@@ -63,6 +64,8 @@ public void initialize() {
6364
category.addItem(item);
6465
}
6566
}
67+
68+
startWebView.getEngine().load(IndexController.QQ_URL);
6669
}
6770

6871
private void addCategory(PluginCategoryController category) {

src/main/resources/com/xwintop/xJavaFxTool/fxmlView/newui/main.fxml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<?import javafx.geometry.Insets?>
4-
<?import javafx.scene.control.*?>
5-
<?import javafx.scene.layout.*?>
4+
<?import javafx.scene.control.Hyperlink?>
5+
<?import javafx.scene.control.Label?>
6+
<?import javafx.scene.control.ScrollPane?>
7+
<?import javafx.scene.control.Tab?>
8+
<?import javafx.scene.control.TabPane?>
9+
<?import javafx.scene.control.TextField?>
10+
<?import javafx.scene.layout.HBox?>
11+
<?import javafx.scene.layout.Pane?>
12+
<?import javafx.scene.layout.VBox?>
13+
<?import javafx.scene.web.WebView?>
614
<VBox prefHeight="600" prefWidth="800" spacing="5"
715
stylesheets="/com/xwintop/xJavaFxTool/fxmlView/newui/main.css"
816
xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/10.0.2-internal"
@@ -31,5 +39,8 @@
3139
</VBox>
3240
</ScrollPane>
3341
</Tab>
42+
<Tab text="欢迎吐槽">
43+
<WebView fx:id="startWebView"/>
44+
</Tab>
3445
</TabPane>
3546
</VBox>

0 commit comments

Comments
 (0)