<commit_before>package de.haw.rnp.client.view;

import javafx.scene.Scene;

public class LoginViewController {

    private LoginView loginView;

    public Scene initLoginView() {
        loginView = new LoginView();
        initOnEvents();
        return loginView.getScene();
    }

    private void initOnEvents(){
        loginView.getSignin().setOnAction(action -> {
            String user = loginView.getUserTextField().getText() + " - me";
            String host = loginView.getHostTextField().getText();
            String port = loginView.getPortTextField().getText();
            try {
                if (controller.login(user, InetAddress.getByName(host), serverHostName, Integer.parseInt(port), serverPort)) {
                    initChatView(controller.getUserList());
                }
            } catch (UnknownHostException e) {
                e.printStackTrace();
            }
        });
    }

}<commit_msg>implemented new LoginView logic<commit_after>package de.haw.rnp.client.view;

import javafx.scene.Scene;

public class LoginViewController {

    private LoginView loginView;
    private ViewController controller;

    public LoginViewController(ViewController controller){
        this.controller = controller;
    }

    public Scene initLoginView() {
        loginView = new LoginView();
        initOnEvents();
        return loginView.getScene();
    }

    private void initOnEvents(){
        loginView.getSignin().setOnAction(action -> {
            String user = loginView.getUserTextField().getText();
            String host = loginView.getHostTextField().getText();
            int port = Integer.parseInt(loginView.getPortTextField().getText());

            if(controller.sendLogin(user, host, port)){
                controller.changeViewState(ViewController.ViewState.Chat);
            }
        });
    }

}
{'fraction_non_alphanumeric': 0.10704679935449166, 'fraction_numerical': 0.0, 'mean_word_length': 2.4380776340110906, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7590853', 'n_tokens_mistral': 481, 'n_tokens_neox': 460, 'n_words': 92}