diff --git a/src/de/deadlocker8/budgetmaster/logic/Settings.java b/src/de/deadlocker8/budgetmaster/logic/Settings.java index 29da9144f034f48ca750422b9ab76899a8a21eb7..2d8612467f033bf9e64bd9972599a121509d5912 100644 --- a/src/de/deadlocker8/budgetmaster/logic/Settings.java +++ b/src/de/deadlocker8/budgetmaster/logic/Settings.java @@ -13,6 +13,7 @@ public class Settings private boolean restActivated; private ArrayList<String> trustedHosts; private LanguageType language; + private boolean autoUpdateCheckEnabled; public Settings() { @@ -87,6 +88,16 @@ public class Settings public void setLanguage(LanguageType language) { this.language = language; + } + + public boolean isAutoUpdateCheckEnabled() + { + return autoUpdateCheckEnabled; + } + + public void setAutoUpdateCheckEnabled(boolean autoUpdateCheckEnabled) + { + this.autoUpdateCheckEnabled = autoUpdateCheckEnabled; } public boolean isComplete() @@ -104,6 +115,6 @@ public class Settings @Override public String toString() { - return "Settings [clientSecret=" + clientSecret + ", url=" + url + ", secret=" + secret + ", currency=" + currency + ", restActivated=" + restActivated + ", trustedHosts=" + trustedHosts + ", language=" + language + "]"; + return "Settings [clientSecret=" + clientSecret + ", url=" + url + ", secret=" + secret + ", currency=" + currency + ", restActivated=" + restActivated + ", trustedHosts=" + trustedHosts + ", language=" + language + ", autoUpdateCheckEnabled=" + autoUpdateCheckEnabled + "]"; } } \ No newline at end of file diff --git a/src/de/deadlocker8/budgetmaster/logic/Updater.java b/src/de/deadlocker8/budgetmaster/logic/Updater.java new file mode 100644 index 0000000000000000000000000000000000000000..33850d833738c3528bb4fd43d3cca2b35a6c7edd --- /dev/null +++ b/src/de/deadlocker8/budgetmaster/logic/Updater.java @@ -0,0 +1,104 @@ +package de.deadlocker8.budgetmaster.logic; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; + +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; + +import de.deadlocker8.budgetmaster.logic.updater.VersionInformation; + +public class Updater +{ + private VersionInformation latestVersion; + private JsonObject changelogJSON; + private static final String LATEST_VERSION_INFO_URL = "https://raw.githubusercontent.com/deadlocker8/BudgetMaster/master/src/de/deadlocker8/budgetmaster/resources/languages/_de.properties"; + private static final String CHANGELOG_URL = "https://raw.githubusercontent.com/deadlocker8/BudgetMaster/master/src/de/deadlocker8/budgetmaster/resources/changelog.json"; + + public Updater() + { + latestVersion = new VersionInformation(0, "-", "-"); + } + + private VersionInformation getLatestVersionInformationFromServer() throws IOException + { + URL webseite = new URL(LATEST_VERSION_INFO_URL); + URLConnection connection = webseite.openConnection(); + + BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream())); + String line; + + ArrayList<String> lines = new ArrayList<String>(); + + while ((line = br.readLine()) != null) + { + lines.add(line); + } + + VersionInformation versionInfo = new VersionInformation(); + + for(String currentLine : lines) + { + if(currentLine.contains("version.code")) + { + versionInfo.setVersionCode(Integer.parseInt(currentLine.substring(currentLine.indexOf("=") + 1, currentLine.length()))); + } + + if(currentLine.contains("version.name")) + { + versionInfo.setVersionName(currentLine.substring(currentLine.indexOf("=") + 1, currentLine.length())); + } + + if(currentLine.contains("version.date")) + { + versionInfo.setDate(currentLine.substring(currentLine.indexOf("=") + 1, currentLine.length())); + } + } + + if(!versionInfo.isComplete()) + throw new IllegalArgumentException("VersionInformation not complete"); + + return versionInfo; + } + + public boolean isUpdateAvailable(int currentVersionCode) throws IOException + { + latestVersion = getLatestVersionInformationFromServer(); + return currentVersionCode < latestVersion.getVersionCode(); + } + + public VersionInformation getLatestVersion() + { + return latestVersion; + } + + public void getChangelogFromURL() throws IOException + { + URL webseite = new URL(CHANGELOG_URL); + URLConnection connection = webseite.openConnection(); + + BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream())); + String line; + StringBuilder data = new StringBuilder(); + while ((line = br.readLine()) != null) + { + data.append(line); + } + + JsonParser parser = new JsonParser(); + this.changelogJSON = parser.parse(data.toString()).getAsJsonObject(); + } + + public String getChangelog(int versionCode) + { + if(changelogJSON != null) + { + return changelogJSON.get(String.valueOf(versionCode)).getAsString(); + } + return null; + } +} \ No newline at end of file diff --git a/src/de/deadlocker8/budgetmaster/logic/updater/VersionInformation.java b/src/de/deadlocker8/budgetmaster/logic/updater/VersionInformation.java new file mode 100644 index 0000000000000000000000000000000000000000..4af7faf0316d2e4df03ef836a3551c733f0e534f --- /dev/null +++ b/src/de/deadlocker8/budgetmaster/logic/updater/VersionInformation.java @@ -0,0 +1,61 @@ +package de.deadlocker8.budgetmaster.logic.updater; + +public class VersionInformation +{ + private int versionCode; + private String versionName; + private String date; + + public VersionInformation(int versionCode, String versionName, String date) + { + this.versionCode = versionCode; + this.versionName = versionName; + this.date = date; + } + + public VersionInformation() + { + this.versionCode = -1; + } + + public int getVersionCode() + { + return versionCode; + } + + public void setVersionCode(int versionCode) + { + this.versionCode = versionCode; + } + + public String getVersionName() + { + return versionName; + } + + public void setVersionName(String versionName) + { + this.versionName = versionName; + } + + public String getDate() + { + return date; + } + + public void setDate(String date) + { + this.date = date; + } + + public boolean isComplete() + { + return versionCode != -1 && versionName != null && date != null; + } + + @Override + public String toString() + { + return "VersionInformation [versionCode=" + versionCode + ", versionName=" + versionName + ", date=" + date + "]"; + } +} \ No newline at end of file diff --git a/src/de/deadlocker8/budgetmaster/logic/utils/Strings.java b/src/de/deadlocker8/budgetmaster/logic/utils/Strings.java index 6e38376d818dca2360933e93bf21129adf805b02..5e397726f5cc7635d80aad42870e37241e502fd6 100644 --- a/src/de/deadlocker8/budgetmaster/logic/utils/Strings.java +++ b/src/de/deadlocker8/budgetmaster/logic/utils/Strings.java @@ -133,6 +133,9 @@ public class Strings public static final String INFO_TEXT_LANGUAGE_CHANGED = "info.text.language.changed"; public static final String INFO_TEXT_LANGUAGE_CHANGED_RESTART_NOW = "info.text.language.changed.restart.now"; public static final String INFO_TEXT_LANGUAGE_CHANGED_RESTART_LATER = "info.text.language.changed.restart.later"; + public static final String INFO_TITLE_UPDATE_AVAILABLE = "info.title.update.available"; + public static final String INFO_TEXT_UPDATE_AVAILABLE = "info.text.update.available"; + public static final String INFO_TEXT_UPDATE_AVAILABLE_NOW = "info.text.update.available.now"; //WARNING public static final String WARNING_ENDDATE_BEFORE_STARTDATE = "warning.enddate.before.startdate"; diff --git a/src/de/deadlocker8/budgetmaster/resources/languages/_de.properties b/src/de/deadlocker8/budgetmaster/resources/languages/_de.properties index 5617bd8b86aeb8d98d409eed7b868a608fea2329..3852afab4b4b904cd932d9c7183e155cb7cac840 100644 --- a/src/de/deadlocker8/budgetmaster/resources/languages/_de.properties +++ b/src/de/deadlocker8/budgetmaster/resources/languages/_de.properties @@ -1,7 +1,7 @@ # DEFAULT app.name=BudgetMaster -version.code=8 -version.name=1.4.1 +version.code=1 +version.name=1.5.0_alpha version.date=23.08.17 author=Robert Goldmann credits=L�nderflaggen von Freepik auf https://www.flaticon.com @@ -127,11 +127,13 @@ info.title.welcome=Willkommen info.header.text.welcome=Willkommen beim BudgetMaster info.text.welcome.first.start=Dies scheint dein erster Besuch zu sein, da noch keine Einstellungen existieren.\nDamit es losgehen kann, �berlege dir ein Passwort und trage es in das Passwortfeld ein.\n\n(Hinweis: Das Passwort kann sp�ter jederzeit ge�ndert werden.)\n\n info.text.welcome.compatibility=Deine Einstellungsdatei ist veraltet und muss aktualisert werden.\nSeit Version v1.3.0 wird ein Passwort ben�tigt, um BudgetMaster zu entsperren. Damit es losgehen kann, �berlege dir ein Passwort und trage es in das Passwortfeld ein.\n\n(Hinweis: Das Passwort kann sp�ter jederzeit ge�ndert werden.)\n\n - info.title.language.changed=Neustarten info.text.language.changed=�nderungen der Sprache werden erst nach einem Neustart des Programms wirksam. info.text.language.changed.restart.now=Jetzt neustarten info.text.language.changed.restart.later=Sp�ter neustarten +info.title.update.available=Update verf�gbar +info.text.update.available=Ein Update ist verf�gbar.\nNeue Version: {0}\n\n�nderungen:\n{1} +info.text.update.available.now=Jetzt updaten # WARNING warning.enddate.before.startdate=Das Enddatum darf zeitlich nicht vor dem Startdatum liegen. @@ -261,6 +263,11 @@ settingstab.label.database=Datenbank: settingstab.button.database.export=Exportieren settingstab.button.database.import=Importieren settingstab.button.database.delete=L�schen +settingstab.label.updates=Updates: +settingstab.button.updates.search=Suchen +settingstab.button.updates.automatic=Automatisch suchen +settingstab.label.updates.current.version=Installiert: +settingstab.label.updates.latest.version=Verf�gbar: settings.tab.button.save=Speichern splashscreen.label.password=Passwort: diff --git a/src/de/deadlocker8/budgetmaster/resources/languages/_en.properties b/src/de/deadlocker8/budgetmaster/resources/languages/_en.properties index 583d72fcee558039462aac213b003a1b2c735896..af43d93b216f80beced88e135dc305410a85f1f8 100644 --- a/src/de/deadlocker8/budgetmaster/resources/languages/_en.properties +++ b/src/de/deadlocker8/budgetmaster/resources/languages/_en.properties @@ -1,7 +1,7 @@ # DEFAULT app.name=BudgetMaster -version.code=8 -version.name=1.4.1 +version.code=9 +version.name=1.5.0_alpha version.date=23.08.17 author=Robert Goldmann credits=Flags by Freepik on https://www.flaticon.com @@ -127,11 +127,13 @@ info.title.welcome=Welcome info.header.text.welcome=Welcome to BudgetMaster info.text.welcome.first.start=This seems to be your first visit because there are no settings yet.\nTo enter BudgetMaster consider yourself a password and enter it into the password field.\n\n(Note: the password can be changed at any time.)\n\n info.text.welcome.compatibility=Your settings file is deprecated and needs to be updated.\nSince version v1.3.0, a password is required to unlock BudgetMaster. To enter BudgetMaster consider yourself a password and enter it into the password field.\n\n(Please note that the password can be changed at any time.)\n\n - info.title.language.changed=Restart info.text.language.changed=Changes to the language will only take effect after a restart of the program. info.text.language.changed.restart.now=Restart Now info.text.language.changed.restart.later=Restart Later +info.title.update.available=Update available +info.text.update.available=An update is available.\nNew version: {0}\n\nChanges:\n{1} +info.text.update.available.now=Update Now # WARNING warning.enddate.before.startdate=The end date can not be earlier than the start date. @@ -261,6 +263,11 @@ settingstab.label.database=Database: settingstab.button.database.export=Export settingstab.button.database.import=Import settingstab.button.database.delete=Delete +settingstab.label.updates=Updates: +settingstab.button.updates.search=Search +settingstab.button.updates.automatic=Automatic search +settingstab.label.updates.current.version=Current Version: +settingstab.label.updates.latest.version=Latest Version: settings.tab.button.save=Save splashscreen.label.password=Password: diff --git a/src/de/deadlocker8/budgetmaster/ui/controller/Controller.java b/src/de/deadlocker8/budgetmaster/ui/controller/Controller.java index 2d960d0a2bbb93b4911a366543f0ebf1e02ff7ae..e653694f368bd3c93c3dfe1bba83352be8a6d326 100644 --- a/src/de/deadlocker8/budgetmaster/ui/controller/Controller.java +++ b/src/de/deadlocker8/budgetmaster/ui/controller/Controller.java @@ -2,6 +2,7 @@ package de.deadlocker8.budgetmaster.ui.controller; import java.io.IOException; import java.util.ArrayList; +import java.util.Optional; import org.joda.time.DateTime; @@ -11,6 +12,7 @@ import de.deadlocker8.budgetmaster.logic.FilterSettings; import de.deadlocker8.budgetmaster.logic.NormalPayment; import de.deadlocker8.budgetmaster.logic.PaymentHandler; import de.deadlocker8.budgetmaster.logic.Settings; +import de.deadlocker8.budgetmaster.logic.Updater; import de.deadlocker8.budgetmaster.logic.serverconnection.ExceptionHandler; import de.deadlocker8.budgetmaster.logic.serverconnection.ServerConnection; import de.deadlocker8.budgetmaster.logic.utils.Colors; @@ -26,6 +28,7 @@ import javafx.scene.Parent; import javafx.scene.control.Alert; import javafx.scene.control.Alert.AlertType; import javafx.scene.control.Button; +import javafx.scene.control.ButtonType; import javafx.scene.control.Label; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; @@ -71,6 +74,7 @@ public class Controller private PaymentHandler paymentHandler; private CategoryHandler categoryHandler; private FilterSettings filterSettings; + private Updater updater; private boolean alertIsShowing = false; @@ -89,6 +93,12 @@ public class Controller filterSettings = new FilterSettings(); paymentHandler = new PaymentHandler(); + updater = new Updater(); + + if(settings.isAutoUpdateCheckEnabled()) + { + checkForUpdates(); + } try { @@ -308,6 +318,11 @@ public class Controller { return filterSettings; } + + public Updater getUpdater() + { + return updater; + } public void setFilterSettings(FilterSettings filterSettings) { @@ -325,6 +340,46 @@ public class Controller buttonRight.setDisable(disable); buttonToday.setDisable(disable); } + + public void checkForUpdates() + { + try + { + boolean updateAvailable = updater.isUpdateAvailable(Integer.parseInt(Localization.getString(Strings.VERSION_CODE))); + String changes = updater.getChangelog(updater.getLatestVersion().getVersionCode()); + + if(!updateAvailable) + return; + + Alert alert = new Alert(AlertType.INFORMATION); + alert.setTitle(Localization.getString(Strings.INFO_TITLE_UPDATE_AVAILABLE)); + alert.setHeaderText(""); + alert.setContentText(Localization.getString(Strings.INFO_TEXT_UPDATE_AVAILABLE, + updater.getLatestVersion().getVersionName(), + changes)); + Stage dialogStage = (Stage)alert.getDialogPane().getScene().getWindow(); + dialogStage.getIcons().add(icon); + + ButtonType buttonTypeOne = new ButtonType(Localization.getString(Strings.INFO_TEXT_UPDATE_AVAILABLE_NOW)); + ButtonType buttonTypeTwo = new ButtonType(Localization.getString(Strings.CANCEL)); + alert.getButtonTypes().setAll(buttonTypeOne, buttonTypeTwo); + + Optional<ButtonType> result = alert.showAndWait(); + if (result.get() == buttonTypeOne) + { + //TODO update + } + else + { + alert.close(); + } + } + catch(NumberFormatException | IOException e) + { + Logger.error(e); + //ERRORHANDLING + } + } public void about() { diff --git a/src/de/deadlocker8/budgetmaster/ui/controller/SettingsController.java b/src/de/deadlocker8/budgetmaster/ui/controller/SettingsController.java index c348f1499454586b64eb070a62b272f7efa75b59..7af334bae27f95da802da482f22f48c5c79673b7 100644 --- a/src/de/deadlocker8/budgetmaster/ui/controller/SettingsController.java +++ b/src/de/deadlocker8/budgetmaster/ui/controller/SettingsController.java @@ -6,6 +6,7 @@ import java.util.ArrayList; import java.util.Optional; import de.deadlocker8.budgetmaster.logic.Settings; +import de.deadlocker8.budgetmaster.logic.Updater; import de.deadlocker8.budgetmaster.logic.serverconnection.ExceptionHandler; import de.deadlocker8.budgetmaster.logic.serverconnection.ServerConnection; import de.deadlocker8.budgetmaster.logic.utils.Colors; @@ -26,6 +27,7 @@ import javafx.scene.control.Alert.AlertType; import javafx.scene.control.Button; import javafx.scene.control.ButtonBar.ButtonData; import javafx.scene.control.ButtonType; +import javafx.scene.control.CheckBox; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; import javafx.scene.control.RadioButton; @@ -65,6 +67,10 @@ public class SettingsController @FXML private RadioButton radioButtonRestDeactivated; @FXML private TextArea textAreaTrustedHosts; @FXML private ComboBox<LanguageType> comboBoxLanguage; + @FXML private CheckBox checkboxEnableAutoUpdate; + @FXML private Button buttonSearchUpdates; + @FXML private Label labelCurrentVersion; + @FXML private Label labelLatestVersion; private Controller controller; private LanguageType previousLanguage; @@ -106,6 +112,8 @@ public class SettingsController comboBoxLanguage.setValue(language); previousLanguage = language; } + + checkboxEnableAutoUpdate.setSelected(controller.getSettings().isAutoUpdateCheckEnabled()); } anchorPaneMain.setStyle("-fx-background-color: " + ConvertTo.toRGBHexWithoutOpacity(Colors.BACKGROUND)); @@ -117,6 +125,7 @@ public class SettingsController buttonExportDB.setStyle("-fx-background-color: " + ConvertTo.toRGBHexWithoutOpacity(Colors.BACKGROUND_BUTTON_BLUE) + "; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 14;"); buttonImportDB.setStyle("-fx-background-color: " + ConvertTo.toRGBHexWithoutOpacity(Colors.BACKGROUND_BUTTON_BLUE) + "; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 14;"); buttonDeleteDB.setStyle("-fx-background-color: " + ConvertTo.toRGBHexWithoutOpacity(Colors.BACKGROUND_BUTTON_RED) + "; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 14;"); + buttonSearchUpdates.setStyle("-fx-background-color: " + ConvertTo.toRGBHexWithoutOpacity(Colors.BACKGROUND_BUTTON_BLUE) + "; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 14;"); textFieldURL.setPromptText(Localization.getString(Strings.URL_PLACEHOLDER)); textFieldCurrency.setPromptText(Localization.getString(Strings.CURRENCY_PLACEHOLDER)); @@ -125,6 +134,10 @@ public class SettingsController ToggleGroup toggleGroup = new ToggleGroup(); radioButtonRestActivated.setToggleGroup(toggleGroup); radioButtonRestDeactivated.setToggleGroup(toggleGroup); + + Updater updater = controller.getUpdater(); + labelCurrentVersion.setText(Localization.getString(Strings.VERSION_NAME)); + labelLatestVersion.setText(updater.getLatestVersion().getVersionName()); } private void setTextAreaTrustedHosts(ArrayList<String> trustedHosts) @@ -233,6 +246,7 @@ public class SettingsController controller.getSettings().setRestActivated(radioButtonRestActivated.isSelected()); controller.getSettings().setTrustedHosts(trustedHosts); controller.getSettings().setLanguage(comboBoxLanguage.getValue()); + controller.getSettings().setAutoUpdateCheckEnabled(checkboxEnableAutoUpdate.isSelected()); } else { @@ -260,6 +274,7 @@ public class SettingsController settings.setRestActivated(radioButtonRestActivated.isSelected()); settings.setTrustedHosts(trustedHosts); settings.setLanguage(comboBoxLanguage.getValue()); + settings.setAutoUpdateCheckEnabled(checkboxEnableAutoUpdate.isSelected()); controller.setSettings(settings); } @@ -286,7 +301,7 @@ public class SettingsController controller.refresh(controller.getFilterSettings()); controller.showNotification(Localization.getString(Strings.NOTIFICATION_SETTINGS_SAVE)); - //retstart application if language has changed + //restart application if language has changed if(controller.getSettings().getLanguage() != previousLanguage) { Alert alert = new Alert(AlertType.INFORMATION); @@ -566,4 +581,9 @@ public class SettingsController } } } + + public void checkForUpdates() + { + controller.checkForUpdates(); + } } \ No newline at end of file diff --git a/src/de/deadlocker8/budgetmaster/ui/fxml/SettingsTab.fxml b/src/de/deadlocker8/budgetmaster/ui/fxml/SettingsTab.fxml index 209c927ab5f71f8a98649360fe60e01515576a2a..e27a1a91d71dbda7be519aa467929f567730ff97 100644 --- a/src/de/deadlocker8/budgetmaster/ui/fxml/SettingsTab.fxml +++ b/src/de/deadlocker8/budgetmaster/ui/fxml/SettingsTab.fxml @@ -2,6 +2,7 @@ <?import javafx.geometry.Insets?> <?import javafx.scene.control.Button?> +<?import javafx.scene.control.CheckBox?> <?import javafx.scene.control.ComboBox?> <?import javafx.scene.control.Label?> <?import javafx.scene.control.RadioButton?> @@ -15,11 +16,11 @@ <AnchorPane fx:id="anchorPaneMain" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.deadlocker8.budgetmaster.ui.controller.SettingsController"> <children> - <VBox alignment="TOP_CENTER" layoutY="24.0" prefHeight="562.0" prefWidth="772.0" spacing="25.0" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="25.0"> + <VBox alignment="TOP_CENTER" prefHeight="562.0" prefWidth="772.0" spacing="25.0" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="14.0"> <children> - <HBox prefHeight="359.0" prefWidth="722.0"> + <HBox prefHeight="359.0" prefWidth="722.0" VBox.vgrow="ALWAYS"> <children> - <VBox alignment="CENTER_RIGHT" prefHeight="25.0" prefWidth="158.0" spacing="20.0"> + <VBox alignment="CENTER_RIGHT" prefHeight="25.0" prefWidth="158.0" spacing="15.0"> <children> <Label fx:id="labelClientSecret" prefHeight="25.0" text="%settingstab.label.secret.client"> <font> @@ -81,6 +82,11 @@ <Insets /> </VBox.margin> </Label> + <Label fx:id="labelSecret111221" alignment="CENTER_RIGHT" contentDisplay="RIGHT" maxHeight="-Infinity" prefWidth="158.0" text="%settingstab.label.updates" textAlignment="RIGHT" wrapText="true"> + <font> + <Font name="System Bold" size="16.0" /> + </font> + </Label> <Label fx:id="labelSecret11121" alignment="CENTER_RIGHT" contentDisplay="RIGHT" maxHeight="-Infinity" prefWidth="158.0" textAlignment="RIGHT" wrapText="true"> <font> <Font name="System Bold" size="16.0" /> @@ -95,7 +101,7 @@ <Insets right="25.0" /> </HBox.margin> </VBox> - <VBox alignment="CENTER_LEFT" prefHeight="200.0" prefWidth="100.0" spacing="20.0" HBox.hgrow="ALWAYS"> + <VBox alignment="CENTER_LEFT" prefHeight="200.0" prefWidth="100.0" spacing="15.0" HBox.hgrow="ALWAYS"> <children> <TextField fx:id="textFieldClientSecret" /> <TextField fx:id="textFieldURL" /> @@ -121,7 +127,8 @@ <TextArea fx:id="textAreaTrustedHosts" minHeight="110.0" prefHeight="148.0" prefWidth="539.0" VBox.vgrow="ALWAYS"> <VBox.margin> <Insets /> - </VBox.margin></TextArea> + </VBox.margin> + </TextArea> <ComboBox fx:id="comboBoxLanguage" maxWidth="1.7976931348623157E308" /> <HBox alignment="CENTER_LEFT" prefHeight="11.0" prefWidth="539.0" spacing="30.0"> <children> @@ -145,6 +152,45 @@ <Insets /> </VBox.margin> </HBox> + <HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" spacing="20.0"> + <children> + <VBox spacing="10.0" HBox.hgrow="ALWAYS"> + <children> + <CheckBox fx:id="checkboxEnableAutoUpdate" mnemonicParsing="false" text="%settingstab.button.updates.automatic"> + <font> + <Font size="13.0" /> + </font></CheckBox> + <Button fx:id="buttonSearchUpdates" mnemonicParsing="false" onAction="#checkForUpdates" text="%settingstab.button.updates.search" /> + </children> + </VBox> + <VBox prefHeight="200.0" prefWidth="100.0" spacing="5.0" HBox.hgrow="ALWAYS"> + <children> + <Label fx:id="labelSecret11111" alignment="TOP_LEFT" contentDisplay="CENTER" maxHeight="1.7976931348623157E308" text="%settingstab.label.updates.current.version" textAlignment="CENTER" wrapText="true" VBox.vgrow="ALWAYS"> + <font> + <Font name="System Bold" size="13.0" /> + </font> + </Label> + <Label fx:id="labelSecret111111" alignment="TOP_LEFT" contentDisplay="CENTER" maxHeight="1.7976931348623157E308" text="%settingstab.label.updates.latest.version" textAlignment="CENTER" wrapText="true" VBox.vgrow="ALWAYS"> + <font> + <Font name="System Bold" size="13.0" /> + </font> + </Label> + </children> + </VBox> + <VBox prefHeight="200.0" prefWidth="100.0" spacing="5.0" HBox.hgrow="ALWAYS"> + <children> + <Label fx:id="labelCurrentVersion" alignment="TOP_LEFT" contentDisplay="CENTER" maxHeight="1.7976931348623157E308" textAlignment="CENTER" wrapText="true" VBox.vgrow="ALWAYS"> + <font> + <Font size="13.0" /> + </font></Label> + <Label fx:id="labelLatestVersion" alignment="TOP_LEFT" contentDisplay="CENTER" maxHeight="1.7976931348623157E308" textAlignment="CENTER" wrapText="true" VBox.vgrow="ALWAYS"> + <font> + <Font size="13.0" /> + </font></Label> + </children> + </VBox> + </children> + </HBox> <Button fx:id="buttonSave" mnemonicParsing="false" onAction="#save" text="%settings.tab.button.save"> <font> <Font name="System Bold" size="14.0" /> @@ -161,6 +207,7 @@ </children> <padding> <Insets right="50.0" /> - </padding></VBox> + </padding> + </VBox> </children> </AnchorPane> diff --git a/src/de/deadlocker8/budgetmasterserver/main/_de.properties b/src/de/deadlocker8/budgetmasterserver/main/_de.properties index 9fb7282676790f968f37e305f8ee5397ed7b94da..d07f4b6f92dad9256a366afff5e4eafd225cae67 100644 --- a/src/de/deadlocker8/budgetmasterserver/main/_de.properties +++ b/src/de/deadlocker8/budgetmasterserver/main/_de.properties @@ -1,5 +1,5 @@ app.name=BudgetMasterServer -version.code=8 -version.name=1.4.1 +version.code=9 +version.name=1.5.0_alpha version.date=23.08.17 author=Robert Goldmann \ No newline at end of file