From 647aae72c62ddb3bfcc8e0476076c38542aad292 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Fri, 10 Apr 2020 16:18:01 +0200 Subject: [PATCH] Completed LoginDialog implementation except for closing the dialog --- .../java/envoy/client/data/ClientConfig.java | 9 +- .../event/HandshakeSuccessfulEvent.java | 18 - src/main/java/envoy/client/net/Client.java | 3 +- .../java/envoy/client/ui/LoginDialog.fxml | 90 +++-- .../java/envoy/client/ui/LoginDialog.java | 148 ++++++-- src/main/java/envoy/client/ui/Startup.java | 31 +- .../client/ui/container/LoginDialog.java | 346 ------------------ .../client/ui/container/package-info.java | 13 - 8 files changed, 185 insertions(+), 473 deletions(-) delete mode 100644 src/main/java/envoy/client/event/HandshakeSuccessfulEvent.java delete mode 100644 src/main/java/envoy/client/ui/container/LoginDialog.java delete mode 100644 src/main/java/envoy/client/ui/container/package-info.java diff --git a/src/main/java/envoy/client/data/ClientConfig.java b/src/main/java/envoy/client/data/ClientConfig.java index 63381a0..0b11e40 100644 --- a/src/main/java/envoy/client/data/ClientConfig.java +++ b/src/main/java/envoy/client/data/ClientConfig.java @@ -1,7 +1,6 @@ package envoy.client.data; import java.io.File; -import java.security.NoSuchAlgorithmException; import java.util.function.Function; import java.util.logging.Level; @@ -110,11 +109,5 @@ public class ClientConfig extends Config { * the registration option * @since Envoy Client v0.3-alpha */ - public LoginCredentials getLoginCredentials() { - try { - return new LoginCredentials(getUser(), getPassword(), false); - } catch (NoSuchAlgorithmException e) { - return null; - } - } + public LoginCredentials getLoginCredentials() { return new LoginCredentials(getUser(), getPassword(), false); } } diff --git a/src/main/java/envoy/client/event/HandshakeSuccessfulEvent.java b/src/main/java/envoy/client/event/HandshakeSuccessfulEvent.java deleted file mode 100644 index a04b41a..0000000 --- a/src/main/java/envoy/client/event/HandshakeSuccessfulEvent.java +++ /dev/null @@ -1,18 +0,0 @@ -package envoy.client.event; - -import envoy.event.Event; - -/** - * This {@link Event} indicates that a handshake was completed successfully. - * - * Project: envoy-client
- * File: HandshakeSuccessfulEvent.java
- * Created: 8 Feb 2020
- * - * @author Leon Hofmeister - * @since Envoy Client v0.3-alpha - */ -public class HandshakeSuccessfulEvent extends Event.Valueless { - - private static final long serialVersionUID = 0L; -} diff --git a/src/main/java/envoy/client/net/Client.java b/src/main/java/envoy/client/net/Client.java index 50019f4..d7951eb 100644 --- a/src/main/java/envoy/client/net/Client.java +++ b/src/main/java/envoy/client/net/Client.java @@ -107,11 +107,12 @@ public class Client implements Closeable { Thread.sleep(500); } - logger.info("Handshake completed."); online = true; // Remove user creation processor receiver.removeAllProcessors(); + + logger.info("Handshake completed."); } /** diff --git a/src/main/java/envoy/client/ui/LoginDialog.fxml b/src/main/java/envoy/client/ui/LoginDialog.fxml index 30020e9..9a4c8a0 100644 --- a/src/main/java/envoy/client/ui/LoginDialog.fxml +++ b/src/main/java/envoy/client/ui/LoginDialog.fxml @@ -13,37 +13,61 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +