Add Discord button
This commit is contained in:
parent
292c572175
commit
48770e62d5
|
@ -52,8 +52,12 @@ public class HelpTab extends Tab {
|
|||
Button openCfg = new Button("Open Config Dir");
|
||||
openCfg.setStyle("-fx-font-family: 'Arial'; -fx-font-size: 16px; -fx-font-weight: bold; -fx-text-fill: #ffffff; -fx-background-color: #FF9800; -fx-padding: 15 30; -fx-border-radius: 5; -fx-background-radius: 5;");
|
||||
|
||||
Button openDiscord = new Button("Discord");
|
||||
openDiscord.setStyle("-fx-font-family: 'Arial'; -fx-font-size: 16px; -fx-font-weight: bold; -fx-text-fill: #ffffff; -fx-background-color: #ff0022; -fx-padding: 15 30; -fx-border-radius: 5; -fx-background-radius: 5;");
|
||||
|
||||
File cfgDir = Config.getInstance().getConfigDir();
|
||||
String path = (cfgDir != null) ? cfgDir.getAbsolutePath() : "Unknown";
|
||||
|
||||
Label configStaticLabel = new Label("Config Dir:");
|
||||
configStaticLabel.setStyle("-fx-font-family: 'Arial'; -fx-font-size: 14px; -fx-font-weight: bold; -fx-alignment: center;");
|
||||
Label configValueLabel = new Label(path);
|
||||
|
@ -74,7 +78,7 @@ public class HelpTab extends Tab {
|
|||
VBox vbox = new VBox();
|
||||
vbox.setAlignment(Pos.CENTER);
|
||||
vbox.setSpacing(20);
|
||||
vbox.getChildren().addAll(wanLabelBox, openHelp, configLabelBox, openCfg, logLabelBox, openLog);
|
||||
vbox.getChildren().addAll(wanLabelBox, openHelp, configLabelBox, openCfg, logLabelBox, openLog, openDiscord);
|
||||
|
||||
// Set up the BorderPane layout
|
||||
BorderPane layout = new BorderPane();
|
||||
|
@ -134,6 +138,8 @@ public class HelpTab extends Tab {
|
|||
log.warn("Config dir doesn't exist: {}", configDir.getAbsolutePath());
|
||||
}
|
||||
});
|
||||
|
||||
openDiscord.setOnAction(e -> DesktopIntegration.open("https://discord.gg/8jCXgVHzgf"));
|
||||
}
|
||||
|
||||
private void startDocumentationServer() {
|
||||
|
|
Loading…
Reference in New Issue