Move Donate/Help to Settings side menu

This commit is contained in:
Jafea7 2025-04-02 20:51:30 +11:00
parent 45b98bc898
commit fec970d299
4 changed files with 9 additions and 6 deletions

View File

@ -250,8 +250,6 @@ public class CamrecApplication extends Application {
tabPane.getTabs().add(new RecentlyWatchedTab(recorder, sites)); tabPane.getTabs().add(new RecentlyWatchedTab(recorder, sites));
} }
tabPane.getTabs().add(new SettingsTab(sites, recorder)); tabPane.getTabs().add(new SettingsTab(sites, recorder));
tabPane.getTabs().add(new DonateTabFx());
tabPane.getTabs().add(new HelpTab());
tabPane.setTabDragPolicy(config.getSettings().tabsSortable ? REORDER : FIXED); tabPane.setTabDragPolicy(config.getSettings().tabsSortable ? REORDER : FIXED);
restoreTabOrder(); restoreTabOrder();

View File

@ -15,6 +15,8 @@ import ctbrec.ui.SiteUiFactory;
import ctbrec.ui.controls.range.DiscreteRange; import ctbrec.ui.controls.range.DiscreteRange;
import ctbrec.ui.settings.api.*; import ctbrec.ui.settings.api.*;
import ctbrec.ui.sites.ConfigUI; import ctbrec.ui.sites.ConfigUI;
import ctbrec.ui.tabs.HelpTab;
import ctbrec.ui.tabs.DonateTabFx;
import ctbrec.ui.tabs.TabSelectionListener; import ctbrec.ui.tabs.TabSelectionListener;
import javafx.animation.FadeTransition; import javafx.animation.FadeTransition;
import javafx.animation.PauseTransition; import javafx.animation.PauseTransition;
@ -308,7 +310,8 @@ public class SettingsTab extends Tab implements TabSelectionListener {
Setting.of("", ignoreList)), Setting.of("", ignoreList)),
Group.of("Text Filters", Group.of("Text Filters",
Setting.of("Blacklist", filterBlacklist, "Default list of blacklist filters for site views, space seperated"), Setting.of("Blacklist", filterBlacklist, "Default list of blacklist filters for site views, space seperated"),
Setting.of("Whitelist", filterWhitelist, "Default list of whitelist filters for site views, space seperated"))), Category.of("Sites", siteCategories.toArray(new Category[0])), Setting.of("Whitelist", filterWhitelist, "Default list of whitelist filters for site views, space seperated"))),
Category.of("Sites", siteCategories.toArray(new Category[0])),
Category.of("Proxy", Category.of("Proxy",
Group.of("Proxy", Group.of("Proxy",
Setting.of("Type", proxyType).needsRestart(), Setting.of("Type", proxyType).needsRestart(),
@ -327,7 +330,9 @@ public class SettingsTab extends Tab implements TabSelectionListener {
Setting.of("Use hlsdl (if possible)", useHlsdl, Setting.of("Use hlsdl (if possible)", useHlsdl,
"Use hlsdl to record the live streams. Some features might not work correctly."), "Use hlsdl to record the live streams. Some features might not work correctly."),
Setting.of("hlsdl executable", hlsdlExecutable, "Path to the hlsdl executable"), Setting.of("hlsdl executable", hlsdlExecutable, "Path to the hlsdl executable"),
Setting.of("Log hlsdl output", loghlsdlOutput, "Log hlsdl output to files in the system's temp directory")))); Setting.of("Log hlsdl output", loghlsdlOutput, "Log hlsdl output to files in the system's temp directory"))),
Category.of("Help", (new HelpTab()).getContent()),
Category.of("Donate", (new DonateTabFx()).getContent()));
Region preferencesView = prefs.getView(); Region preferencesView = prefs.getView();
prefs.onRestartRequired(this::showRestartRequired); prefs.onRestartRequired(this::showRestartRequired);
storage.setPreferences(prefs); storage.setPreferences(prefs);

View File

@ -26,7 +26,7 @@ public class DonateTabFx extends Tab {
headerVbox.setAlignment(Pos.CENTER); headerVbox.setAlignment(Pos.CENTER);
var beer = new Label("Buy me some beer?!"); var beer = new Label("Buy me some beer?!");
beer.setFont(new Font(36)); beer.setFont(new Font(36));
var desc = new Label("If you want to donate to the original developer, (0xb00bface), here are some possibilities!"); var desc = new Label("If you want to donate to the original developer, 0xb00bface.");
desc.setFont(new Font(24)); desc.setFont(new Font(24));
headerVbox.getChildren().addAll(beer, desc); headerVbox.getChildren().addAll(beer, desc);
var header = new HBox(); var header = new HBox();

View File

@ -29,7 +29,7 @@ public class HelpTab extends Tab {
Button openLog = new Button("Open Log File"); Button openLog = new Button("Open Log File");
openHelp.setPadding(new Insets(20)); openHelp.setPadding(new Insets(20));
openLog.setPadding(new Insets(20)); openLog.setPadding(new Insets(20));
Label logFilePathLabel = new Label(new File("ctbrec.log").getAbsolutePath()); Label logFilePathLabel = new Label("Log: " + new File("ctbrec.log").getAbsolutePath());
VBox vbox = new VBox(); VBox vbox = new VBox();
vbox.setAlignment(Pos.CENTER); // Center align the buttons vbox.setAlignment(Pos.CENTER); // Center align the buttons