diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js index cfc3a805..a078f21b 100644 --- a/Launcher/runtime/dialog/dialog.js +++ b/Launcher/runtime/dialog/dialog.js @@ -59,12 +59,12 @@ function initLoginScene() { savePasswordBox = pane.lookup("#rememberchb"); savePasswordBox.setSelected(settings.login === null || settings.rsaPassword !== null); - authOptions = pane.lookup("#authOptions"); - var link = pane.lookup("#link"); link.setText(config.linkText); link.setOnAction(function(event) app.getHostServices().showDocument(config.linkURL.toURI())); + authOptions = pane.lookup("#authOptions"); + pane.lookup("#goAuth").setOnAction(goAuth); } @@ -187,25 +187,31 @@ function goAuth(event) { return; } - var rsaPassword = null; - if (!passwordField.isDisable()) { - var password = passwordField.getText(); - if (password !== null && !password.isEmpty()) { - rsaPassword = settingsOverlay.setPassword(password); - } else if (settings.rsaPassword !== null) { - rsaPassword = settings.rsaPassword; - } else { - return; - } + // Get auth + /* var auth = authOptions.getSelectionModel().getSelectedItem(); + if (auth === null) { + return; // No auth selected + }*/ - settings.rsaPassword = savePasswordBox.isSelected() ? rsaPassword : null; - } + var rsaPassword = null; + if (!passwordField.isDisable()) { + var password = passwordField.getText(); + if (password !== null && !password.isEmpty()) { + rsaPassword = settingsOverlay.setPassword(password); + } else if (settings.rsaPassword !== null) { + rsaPassword = settings.rsaPassword; + } else { + return; + } - settings.login = login; - doAuth(login, rsaPassword); -} + settings.rsaPassword = savePasswordBox.isSelected() ? rsaPassword : null; + } -/* ======== Console ======== */ + settings.login = login; + doAuth(/*auth, */login, rsaPassword); + } + + /* ======== Console ======== */ function goConsole(event) { setConsoleCurrentScene(consoleScene); } @@ -236,18 +242,17 @@ function verifyLauncher(e) { initOffline(); } overlay.swap(0, processing.overlay, function(event) makeAuthAvailabilityRequest(function(result) { - //result.list; - //result.list[0].name; - //result.list[0].displayName; - result.list.forEach(function(auth_type, i, arr) { + //result.list; + //result.list[0].name; + //result.list[0].displayName; + result.list.forEach(function(auth_type, i, arr) { + (function() { + authOptions.getItems().add(auth_type.displayName); + //var sm = authOptions.getSelectionModel(); + //sm.selectedIndexProperty()["addListener(javafx.beans.value.ChangeListener)"](settings.auth = i); + })(); - var serverAuth = new com.jfoenix.controls.JFXComboBox(); - serverAuth.getStyleClass().add("authOptions"); - - (function() { - authOptions.getItems().add(auth_type.displayName); - })(); - }); + }); overlay.swap(0, processing.overlay, function(event) makeProfilesRequest(function(result) { settings.lastProfiles = result.profiles; updateProfilesList(result.profiles); diff --git a/Launcher/runtime/dialog/overlay/debug/debug.css b/Launcher/runtime/dialog/overlay/debug/debug.css index 2187bdf0..4edf88b4 100644 --- a/Launcher/runtime/dialog/overlay/debug/debug.css +++ b/Launcher/runtime/dialog/overlay/debug/debug.css @@ -10,10 +10,6 @@ #background > #output { -fx-background-radius: 0; -fx-font-family: monospace; -fx-font-size: 8pt; - -fx-font-weight: regular; -} -#background > .textField { - -fx-font-weight: regular; } #overlay > #output .content, diff --git a/Launcher/runtime/dialog/overlay/update/update.css b/Launcher/runtime/dialog/overlay/update/update.css index 90542c70..dff8e234 100644 --- a/Launcher/runtime/dialog/overlay/update/update.css +++ b/Launcher/runtime/dialog/overlay/update/update.css @@ -3,8 +3,6 @@ #overlay { -fx-background-color: transparent; -fx-background-size: cover; - -fx-pref-width: 693px; - -fx-pref-height: 450px; -fx-background-image: url('../../images/background.jpg'); } @@ -23,8 +21,6 @@ #overlay > #description.error { .downloadPane { -fx-background-color: rgba(0, 0, 0, 0.3); - -fx-pref-width: 693px; - -fx-pref-height: 450px; } /* Progress bar */ diff --git a/Launcher/runtime/dialog/overlay/update/update.fxml b/Launcher/runtime/dialog/overlay/update/update.fxml index 406bdd40..0a1b7653 100644 --- a/Launcher/runtime/dialog/overlay/update/update.fxml +++ b/Launcher/runtime/dialog/overlay/update/update.fxml @@ -1,6 +1,5 @@ - @@ -9,18 +8,21 @@ - + - + -