统一应用顶部栏与设置入口
This commit is contained in:
@@ -111,9 +111,9 @@ public class WorkUtilsApplication implements CommandLineRunner {
|
||||
Platform.runLater(Theme::initTheme);
|
||||
|
||||
// 设置导航栏刷新回调(插件管理中启用/禁用后刷新侧边栏)
|
||||
settingsService.setNavItemsRefresher(items -> Platform.runLater(() -> {
|
||||
settingsService.setNavItemsRefresher(ignoredItems -> Platform.runLater(() -> {
|
||||
if (mainWindow != null) {
|
||||
mainWindow.refreshNavItems(items);
|
||||
mainWindow.refreshNavItems(buildNavItems());
|
||||
// 重新绑定插件面板
|
||||
for (Plugin plugin : pluginManager.getEnabledPlugins()) {
|
||||
PluginDescriptor desc = plugin.getDescriptor();
|
||||
@@ -131,7 +131,7 @@ public class WorkUtilsApplication implements CommandLineRunner {
|
||||
CountDownLatch windowClosed = new CountDownLatch(1);
|
||||
Platform.runLater(() -> {
|
||||
try {
|
||||
mainWindow = new MainWindow(navItems, properties);
|
||||
mainWindow = new MainWindow(navItems, properties, this::openSettingsEmbedded);
|
||||
mainWindow.showAndWait();
|
||||
} catch (Exception e) {
|
||||
log.error("主窗口创建失败", e);
|
||||
@@ -164,14 +164,6 @@ public class WorkUtilsApplication implements CommandLineRunner {
|
||||
));
|
||||
}
|
||||
|
||||
// 系统设置 — 内嵌为 Tab
|
||||
items.add(new MainWindow.NavItem(
|
||||
"⚙️", "系统设置",
|
||||
"配置系统路径、数据库连接、项目路径、多数据源、字体大小等",
|
||||
this::openSettingsEmbedded,
|
||||
"__settings__"
|
||||
));
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user